Set-ADUser -manager $null
Set-Mailbox -HiddenFromAddressListsEnabled $true
Error messages received:
Custom Script Result :Set-ADUser : The term 'Set-ADUser' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was included, verify that the path is correct and try again. At D:\ManageEngine\Scripts\Manager.ps1:1 char:1 + Set-ADUser %username% -manager $null + ~~~~~~~~~~ + CategoryInfo : ObjectNotFound: (Set-ADUser:String) [], CommandNotFoundException + FullyQualifiedErrorId : CommandNotFoundException
Set-Mailbox : The term 'Set-Mailbox' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was included, verify that the path is correct and try again. At D:\ManageEngine\Scripts\Manager.ps1:2 char:1 + Set-Mailbox -HiddenFromAddressListsEnabled $true + ~~~~~~~~~~~ + CategoryInfo : ObjectNotFound: (Set-Mailbox:String) [], CommandNotFoundException + FullyQualifiedErrorId : CommandNotFoundException