Use the Force!

by Jan 7, 2010

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 example, Get-Childitem (aka Dir) by default does not list hidden files. However, with -force, it does. Another example: Stop-Computer shuts down a computer only if all data is saved. By specifying -force, the machine will shut down immediately.

To list all cmdlets that support -force, use this command:

Get-Help * -parameter force

Twitter This Tip! ReTweet this Tip!