Powershell

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

Displaying MsgBox TopMost

In a previous tip you learned how to load additional .NET assemblies. This enables you to display dialog boxes like a MsgBox, pretty much like in...

read more

Using Open File Dialogs

To spice up your scripts, PowerShell can use the system open file dialog, so users could easily select files to open or to parse. Here's the...

read more

Playing WAV files

PowerShell can play WAV files, so you can add sound and special effects to your scripts (provided your system has a sound card): PS> $player =...

read more

Installing Local Printer

WMI represents all locally installed printers with its class Win32_Printer, so you can easily look what's installed: PS> Get-WmiObject -Class...

read more
1 82 83 84 85 86 130