PowerGUI – Remotely Determine if Powershell is Installed

Here is a Node Script to determine if Powershell is installed on a remote computer:

[System.Reflection.Assembly]::LoadWithPartialName(‘Microsoft.VisualBasic’) | Out-Null
$name = [Microsoft.VisualBasic.Interaction]::Inputbox(“Enter the IP or Name of the server:”)
$pshell = Get-WmiObject Win32_QuickFixEngineering -ComputerName “$($name)” | Where-Object{$_.HotFixID -eq “kb968930”}
if ($pshell -eq $null){Write-Output “Powershell 2.0 is NOT installed.”}
else {Write-Output “Powershell 2.0 IS installed”}

If you found this useful, subscribe.


Have an opinion? Leave an opinion!

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s