Quantcast
Channel: PowerShell.org » All Posts
Viewing all articles
Browse latest Browse all 13067

Reply To: New-Object Saved as a $variable

$
0
0

$s = New-PSSession -ComputerName (gc c:\computers.txt)
$Hotfix = 'KB976002'

$Results = Invoke-Command -Session $S -ScriptBlock {
$Result = Get-Hotfix -Id $Using:Hotfix
New-Object -TypeName psobject -Property @{ Installed = ($Result -ne $null) }
}

$Results| ft -autosize


Viewing all articles
Browse latest Browse all 13067

Trending Articles