Follow

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use
Contact

""Missing argument in parameter list."" when trying to define a list of Site IDs

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?

MEDevel.com: Open-source for Healthcare and Education

Collecting and validating open-source software for healthcare, education, enterprise, development, medical imaging, medical records, and digital pathology.

Visit Medevel

Thanks

>Solution :

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'
Add a comment

Leave a Reply

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use

Discover more from Dev solutions

Subscribe now to keep reading and get access to the full archive.

Continue reading