powertips

Expanding Group Results

Group-Object is perfect for grouping objects based on one or more properties. Once you group objects, you can then filter, or sort, based on their...

read more

Sort With PS Code

Sort-Object is a great and versatile cmdlet to sort anything you want. Simply specify the property or properties you want to use for sorting: Dir...

read more

Ejecting CDs

PowerShell can still use COM libraries. Simply use New-Object -comObject and provide the COM library name to load it. With this approach, you can do...

read more

Deleting Aliases

As you may know aliases are shortcuts to other commands. So, you can easily add new aliases like this: Set-Alias edit notepad.exe The next time you...

read more

Creating Text Files

PowerShell offers you a multitude of ways to write information to disk. Here's a quick overview. 1. You can use classic redirection:...

read more

Detect DHCP State

You can use WMI and Win32_NetworkAdapterConfiguration to determine whether a computer uses DHCP to acquire an IP address. Simply look for all...

read more

Select Folder-Dialog

Want to provide your users with a neat dialog to select folders? Simply use a COM object called Shell.Application, which provides the...

read more