I'm trying to disable devices using Update-MgDevice. According to the documentation, -AccountEnabled should be a switch that accepts a boolean (true or false)
I can get the accountEnabled property status, whether true or false, using Get-MgDevice, but I can't seem to enable or disable using Update-MgDevice
Whether or not I use Update-MgDevice -AccountEnabled $True/'true'true or use Update-MgDevice -AccountEnabled $False/'false'/false I get the same error:
Update-MgDevice : A positional parameter cannot be found that accepts argument 'True'. or Update-MgDevice : A positional parameter cannot be found that accepts argument 'False'.
Am I just not understanding the switch properly?