Reputation: 49
I cant seems to find the root cause of this error:
Get-MsolPasswordPolicy : Unknown error occurred. At line:1 char:1 + Get-MsolPasswordPolicy + ~~~~~~~~~~~~~~~~~~~~~~ + CategoryInfo : OperationStopped: (:) [Get-MsolPasswordPolicy], MicrosoftOnlineException + FullyQualifiedErrorId : Microsoft.Online.Administration.Automation.DomainNotRootException,Microsoft.Online.Administration.Automation.GetPasswordPolicy
Basically, I ran this command Get-MsolPasswordPolicy -DomainName test.example.com
and got the error above.
But I am able to run the command with root domain: example.com
Both domains are verified. I am wondering if the command is applicable to subdomain.
Anyone met with this before?
Upvotes: 0
Views: 1536
Reputation: 661
You can't set a password policy for subdomains.
Subdomains get the policy of their root domains.
To get all the domains for which a password policy is assignable, try the following command:
Get-MsolDomain | Where {$_.Status -eq "Verified" -and !$_.RootDomain } | select Name
Upvotes: 2