how to test powersheel installed or not code example Example: check powershell version PS C:\> $PSVersionTable.PSVersion