Usefull Powershell Commands

A collection of random PowerShell commands I wanted to save…

List all active variables, not just ones you have created

Get-Variable

List a particular variable that you have created

Get-Variable -name replacethiswiththenameofyourvariablewithout$

Clear the value of a variable that you have created

Clear-Variable -name replacethiswiththenameofyourvariablewithout$

Delete / Remove the variable that you have created

Remove-Variable -name replacethiswiththenameofyourvariablewithout

How to Check the Active Directory Schema Version

Get-ADObject (Get-ADRootDSE).schemaNamingContext -Property objectVersion

Leave a Reply