Tuesday, 15 September 2015

Connect-MsolService incorrectly shows as having a -CurrentCredentials parameter in PowerShell help

You may find that running Get-Help against the "Connect-MsolService" cmd incorrectly shows as having a -CurrentCredentials parameter in PowerShell help.

This switch parameter is not actually available

Connect-MsolService -CurrentCredentials
Connect-MsolService : A parameter cannot be found that matches parameter name 'CurrentCredentials'.
At line:1 char:22
+  Connect-MsolService -CurrentCredentials
+                      ~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : InvalidArgument: (:) [Connect-MsolService], ParameterBindingException
    + FullyQualifiedErrorId : NamedParameterNotFound,Microsoft.Online.Administration.Automation.ConnectMsolServic
   e

You can see this in the online documentation for the cmdlet, a PSCredential must actually be provided.
https://msdn.microsoft.com/en-us/library/azure/dn194123.aspx

Why not check out our Network Automation Tool, for automatically creating Office365 accounts.


No comments:

Post a Comment