I have the following as part of a Power-Shell script:=
Connect-ExchangeOnline
$SiteIDs = (64898c8f-2d5f-4e0e-9a9b-eb9828975a9e,20e6140c-0441-4988-b36c-c61cf3400847)
where i am trying to define a list of site IDs, but the above is returning this error:-
PS C:\WINDOWS\system32> $SiteIDs = (64898c8f-2d5f-4e0e-9a9b-eb9828975a9e,20e6140c-0441-4988-b36c-c61cf3400847)
At line:1 char:49
$SiteIDs = (64898c8f-2d5f-4e0e-9a9b-eb9828975a9e,20e6140c-0441-4988-b ...
~
Missing argument in parameter list.
CategoryInfo : ParserError: (:) [], ParentContainsErrorRecordException
FullyQualifiedErrorId : MissingArgument
Any advice?
Thanks
CodePudding user response:
Your SiteIDs
should probably be a list of strings. Therefore, you must put them into quotes (and you can omit the parentheses):
$SiteIDs = '64898c8f-2d5f-4e0e-9a9b-eb9828975a9e','20e6140c-0441-4988-b36c-c61cf3400847'