Closed Poojacheshmish closed 1 month ago
$Serverslist=DXXXX1W9262,DXXXX1W9261
is incorrect PowerShell syntax.
If you use $Serverslist='DXXXX1W9262', 'DXXXX1W9261'
, the command should work fine, because $Serverlist
is an array containing two strings. If you use $Serverslist='DXXXX1W9262,DXXXX1W9261'
, then this is only one string that is not parsable as an instance name.
@andreasjordan that is certainly the problem, will close this. Thank you.
Verified issue does not already exist?
No, I did not search
What error did you receive?
"Cannot convert value "DEDA1W9262,DEDA1W9261" to type "Dataplat.Dbatools.Parameter.DbaInstanceParameter". Error: "Failed to parse instance name: DEDA1W9262,DEDA1W9261"" At C:\Users\sadm-X265343\Desktop\Final Code.ps1:20 char:34
Steps to Reproduce