Chapter 6 Quick Reference

To

Do This

Simplify connecting into WMI while using default security permissions

Use the Get-WmiObject cmdlet

To control security when making a remote connection

Specify the impersonation levels in your script

To allow a script to use the credentials of the person launching the script

Use the "impersonate" impersonation level

To allow a script to load a driver

Use the loadDriver privilege

To control security when making a remote connection

Specify the impersonation levels in your script

Get rid of system properties when printing out all properties of a WMI class

Use the Format-List cmdlet and specify the property argument must be in range of [a–z]*

Get the current date and time

Use the Get-Date cmdlet

Subtract two dates

Use the New-TimeSpan ...

Get Microsoft® Windows PowerShell™ Step By Step now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.