In order to run this script, make sure you execute following command before:
Set-ExecutionPolicy Bypass -Scope Process -Force
It makes that you be able to run any script during current powershell session. If you close the powershell window you'll have to invoke this command again.
Then you can finally run:
.\HiddenAccounts.ps1
Alternatively :
.\HiddenAccountsRemover.ps1
- Scripts does not verify correctness of password & username - even length isn't checked.
- Be sure you aren't overwriting one of the Microsoft account - inputted name can't be the same as M$ is!