Tips and Tricks (Page 2/59)

#PSTip Find variables in a script

Note: This tip requires PowerShell 3.0 or later. I had recently completed writing a PowerShell module for an internal project….

Read More

#PSTip Convert .docx to .pdf using Word.Application

The Word.Application object can be used to convert Word documents into PDF files. This requires Microsoft Word to be installed…

Read More

#PSTip Determine compression ratio of compressed files

In the previous #PSTip Compress files and folders with System.IO.Compression.FileSystem class, a .zip file was created and extracted. Now it…

Read More

#PSTip Compress files and folders with System.IO.Compression.FileSystem class

Using the CreateFromDirectory and ExtractToDirectory methods, it is possible to compress and extract files. In this tip I will show…

Read More

#PSTip Use Shell.Application to determine which folder is open in File Explorer

By using the Windows() method and the LocationURL and LocationName properties we can programmatically determine which folder is open in…

Read More

#PSTip Get last login date for local account

Using the ADSI type accelerator in combination with WinNT provider we can retrieve the last logon time for a local…

Read More