customer relationships

PowerShell: Use a destructive PowerShell cmdlet safely

PowerShell has a built-in safety switch to many of its cmdlets.

The –whatif parameter, which is meant to show you what would happen if you used a PowerShell cmdlet without actually executing the cmdlet. An example of this in action is in the following Remove-Item cmdlet.

 

This will attempt to remove the document, HSG-Article-Sean-Should-Not-Lose.docx, without actually removing it.

Remove-Item .\HSG-Article-Sean-Should-Not-Lose.docx -WhatIf


Got a project that needs expert IT support?

From Linux and Microsoft Server to VMware, networking, and more, our team at CR Tech is here to help.

Get personalized support today and ensure your systems are running at peak performance or make sure that your project turns out to be a successful one!

CONTACT US NOW
best vpn deal