Everything works fine if If I type out the comma delimited list.
However, when I use the variable $CommaDelimitedSystemsList, I get the error “New-PSSession : One or more computer names are not valid. If you are trying to pass a URI, use the -ConnectionUri parameter, or pass URI objects instead of strings.”
The values are getting stored correctly in $CommaDelimitedSystemsList, so I’m not sure what the problem is.
Try just -ComputerName $Systems . You want to be passing an array of computer names to that parameter, not a single comma-delimited string. (When you type it out yourself, assuming that you haven’t put the whole thing in quotes, the commas act as an operator in PowerShell that create an array.)