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 ... |
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access