PowerShell – Remove Built-in Administrator Account

To delete the built-in Administrator account, this is the process: #1 Take ownership HKEY_LOCAL_MACHINE\SAM\SAM #2 Grant reg rights HKEY_LOCAL_MACHINE\SAM\SAM #3 Delete HKEY_LOCAL_MACHINE\SAM\SAM\Builtin\Account\Users\Names\Administrator #4 Remove user account from Local Users and Groups     Notes PropagationFlags Enum InheritanceFlags Enum AccessControlType Enum Remove-Item -Path “HKLM:\SAM\SAM\Domains\Account\Users\Names\Administrator” HKEY_LOCAL_MACHINE\SAM\SAM\Domains\Account\Users\Names\Administrator