QuickFix: New-MgUser -AccountEnabled

If like me you just spent twenty minutes trying to make sense of this:

https://learn.microsoft.com/en-us/powershell/module/microsoft.graph.users/new-mguser?view=graph-powershell-1.0#-accountenabled

I tried omitting the parameter, using $false or $true with the parameter, and even just following the example..

https://learn.microsoft.com/en-us/powershell/module/microsoft.graph.users/new-mguser?view=graph-powershell-1.0#examples

Let me save you some time.

-AccountEnabled:$true

-AccountEnabled:$false

That’s it.

Unknown's avatarAbout Robert Pearman
Robert Pearman is a UK based IT worker bee. He has been working within the IT Industry for what feels like forever. Robert likes Piña colada and getting caught in the rain, he also enjoys writing about Technology like PowerShell or System Automation but not as much as he used to. If you're in trouble, and you can find him, maybe you can ask him a question.

Leave a reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.