Hello,
I run the following Powershell Remoting command and I get a list of machines in a Powershell list format. All I'm looking to do is take the output and 1.) Count the number of machines, and 2.)Display in a Table with just PSComputerName and ServicePackMajorVersion.
I've tried some table logic and counting after the where clause via 'piping', but I wasnt successful and I dont understand why I cant do it. Any ideas? Im basically unclear on how to work with the results of a scriptblock being executed via PS remoting. Thanks in advance.
$Sessid = New-Pssession $MyDCs Invoke-Command -session $Sessid -scriptblock {GET-WMIOBJECT win32_operatingsystem | SELECT-OBJECT Name,ServicePackMajorVersion,ServicePackMinorVersion | where {$_.ServicePackMajorVersion -ne 1} }
Thanks for your help! SdeDot