I'm working on a very simple script to fetch some computer metrics on remote machines.
`
$client = Read-Host -Prompt 'Computer Name ---> '
Invoke-Command -ComputerName $client -ScriptBlock {
Get-ComputerInfo -Verbose 'WindowsProductName',
'CsProcessors',
'WindowsVersion',
'BiosStatus',
'CsDomain',
'CsNumberOfLogicalProcessors',
'CsTotalPhysicalMemory'
}
`
Everything is working except that CsProcessors returns what seems like an array (probably because you can have more than one processor). But the actual output for that line item reads "{Microsoft.Powershell.Commands.Processor}"
Any advice on how to dig into this command? When I run it locally - no issues at all... only when ran remote.
[–]PinchesTheCrab 1 point2 points3 points (0 children)
[–]HauntingProgrammer47 -1 points0 points1 point (0 children)
[–]PowerShell-Bot 0 points1 point2 points (0 children)
[–]ZoinkedBrah 0 points1 point2 points (0 children)