powertips

Vertical Grid View

You can always pipe objects to Out-GridView and get a nice extra window with all of the object properties lined up as table. That's useful if...

read more

Finding Type Accelerators

PowerShell maintains a list of shortcuts for .NET types to make coding more convenient for you. For example, to convert a string to a DateTime type,...

read more

Returning Multiple Values

A PowerShell function can return multiple values. To receive them, simply assign the result to multiple variables: function Get-DateTimeInfo { #...

read more

Using Safe Cmdlets Only

Let's assume you want to set up a restricted PowerShell v3 console that just provides access to Microsoft cmdlets with the verb Get. One way to...

read more

Finding Published Printers

Finding printers that have been published in your Active Directory becomes trivial with Windows 8 or Server 2012. PS> Get-Printer -ComputerName...

read more

Get CPU Load

To get the average total CPU load for your local system or a remote system, use Get-Counter. The example below returns the average total CPU load...

read more

Listing Power Plans

There is a somewhat hidden WMI namespace that holds WMI classes you can use to manage power plans. The code below lists all power plans on your...

read more

New Operator -In

In PowerShell v3, you can use a new simplified syntax for Where-Object. Both lines below list all files in your Windows folder that are larger than...

read more

Finding Keyboard and Mouse

You can use WMI to quickly find all details about your mouse and keyboard: PS> Get-WmiObject win32_PointingDevice | Where-Object { $_.Description...

read more
1 74 75 76 77 78 122