Sometimes, you may run into issues like this once you learned more about the parameters a given cmdlet supports: Get-Random -Minimum 1 -Maximum 50...
Powershell
Finding Positional Parameters
Positional parameters can be great time savers as many cmdlets assign a parameter position to its most widely used parameters. This way you do not...
Finding All Background Information About Operators or Remoting
Since Get-Help accepts wild cards, you can easily list all white papers available for a specific topic. Use this to get you all topics that deal...
Sending Information to the Clipboard
Beginning with Vista, there is a new console tool called clip.exe, which copies whatever you pipe to it to your clipboard. You should try this if...
Overwriting Pre-Defined Aliases
PowerShell protects its own pre-defined aliases so you normally cannot override and redefine them. It will still work if you use the correct...
A Better more.com
Whenever you want to break up a lot of information in separate page views, you can traditionally pipe to more.com, which is an external executable....
Reading Help with Page Breaks
Help information is typically pretty extensive. If you'd like to make the information more readable, you could always pipe the result to the...
Opening PowerShell White Papers Directly
The following line opens the folder that stores all the PowerShell white papers. You can open them in your word processor or print them for future...
Discovering PowerShell Background Information
PowerShell comes with lots of white papers. However, you do not need to know the exact title of the white paper to find information about a specific...
Retrieving Event Logs Remotely
PowerShell v.2 has added remote capabilities to a number of cmdlets, including Get-EventLog. So now you are able to collect important events...
Changing Execution Policy without Admin Rights
In PowerShell v.2, a number of parameters have been added to Set-ExecutionPolicy, which allows you to change this setting without Admin privileges,...
Smart Auto-Completion
When you press Tab to auto-complete, PowerShell will look at what you have entered so far to find the most appropriate suggestion. One little known...
Auto-Completion Reverse
You probably already know how to invoke code completion: simply press Tab. You will then see that a new suggestion is displayed each time you do...
Listing Installed Software
You will find that listing installed software can be somewhat difficult as WMI provides the Win32_Product class, which only covers managed installs...
Out-GridView Dirty Tricks
Out-Gridview is a new cmdlet in PowerShell v.2 which allows you to output objects to a "mini" excel sheet like this: Get-Process |...
Remote Access Without Admin Privileges
In PowerShell v.2, remote access is available only to users who hold local administrator privileges. So, even if you do have appropriate remote...
Using MS Access Drivers on 64Bit
Although 64bit machines have become common place, some techniques are still only 32bit. For example, whenever a PowerShell script tries to access a...
Running PowerShell Scripts as a Service
You should call powershell.exe with the options -noprofile -command like this to run a PowerShell script externally: Powershell.exe -noprofile...
Finding Cmdlets by Keyword
You can easily discover the cmdlets suitable for a specific job with the help of a little function: function ??($keywords) { Get-Help * | ? {...
Uncovering Parameter Binding
You should use Trace-Command: if you are ever in doubt about just how PowerShell binds cmdlet parameters to a cmdlet Trace-Command -psHost -Name...
Mixing Parameter Sets
You will find that some cmdlet parameters belong to different parameter sets. Any cmdlet can use only parameters from one parameter set. You will...
Secret Parameter Alias Names
It is important to note that cmdlet parameters can have assigned alias names. They are not always easy to find but they are there. This is why you...
Cmdlet Alias
For most cmdlets, there are convenient shortcut names that are the alias names. So whenever you find yourself using a new cmdlet, you should take a...
Copying Help Information (or other things) to Clipboard
Most people aren't aware that Windows comes with a small application called clip.exe (introduced in Windows Vista). You can use it within the...