Powershell

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...

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...

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...

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...

Visiting Help Topics

All Help topics inside of PowerShell are stored as plain text files. You can read them by using Get-Help, but you can also more easily open the...

Dangerous Keystroke

You are probably aware of CTRL+C to break the current command. However, you should beware of CTRL+BREAK! This key shortcut will not only break the...

Getting Advanced Help

While Get-Help does not just document cmdlets, it also allows you to find out more about general PowerShell concepts: Get-Help about_* For example,...

Getting Paginated Help

Reading Help information using Get-Help is great, but often (especially when specifying the -full or -detailed switch parameter), you retrieve so...

Childproofing PowerShell

If you are new to PowerShell, you may be worried about causing unwanted damage or change. One way of childproofing PowerShell is by changing the...

Find Potentially Harmful Cmdlets

Any cmdlet that can change and potentially damage your system supports the -whatif parameter, allowing you to just simulate the action without...

Use the Force!

Many cmdlets support the -force switch parameter. With it, the cmdlet will do more than usual. What exactly -force does depends on the cmdlet. For...

Listing Program Versions

You may already know about the Get-Process cmdlet, which lists all running processes, locally and remotely (use -computername for remote access)....

Using Relative Dates

Sometimes, you need relative dates. What date was 14 days ago? Maybe you want to use this relative date to select files of a certain age. You can...

Creating Temporary File Names

Get-Date not only will retrieve the current date, but you can also construct a custom date format to create time-stamped temporary file names:...

Getting Hotfix Information

PowerShell v.2 comes with a new cmdlet called Get-Hotfix. It retrieves for you all installed hotfixes and updates. You can use it locally or...

Validating Input Type

The -as parameter is not widely known but is extremely versatile. It tries to convert data into a .NET type, and when it fails, it simply returns...

1 92 93 94 95 96 104