I was running the example on pg 252:
Invoke-Command -command {Get-CimInstance -class win32_process } -Session (Get-PSSession -ComputerName loc*)
and get error:
Get-PSSession : Invalid URI: The hostname could not be parsed.
Digging deeper I ran: Get-PSSession -ComputerName *
and get: Get-PSSession : Missing an argument for parameter ‘ComputerName’. Specify a parameter of type ‘System.String’ and try again.
then tried: Get-PSSession -ComputerName localhost and THAT worked.
So, tried the wildcard again: Get-PSSession -ComputerName loc*
and get same error: “…Invalid URI: The hostname could not be parsed.”
What’s up with -ComputerName wild cards as used in the book?