Skip to content

Instantly share code, notes, and snippets.

@mwrock
Created November 20, 2014 23:08
Show Gist options
  • Save mwrock/5fab34c8d1a70745e46b to your computer and use it in GitHub Desktop.
Save mwrock/5fab34c8d1a70745e46b to your computer and use it in GitHub Desktop.
Removing autologon
$winLogonKey="HKLM:\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon"
@("DefaultUserName","DefaultDomainName","DefaultPassword","AutoAdminLogon") | % {
Remove-ItemProperty -Path $winLogonKey -Name $_ -ErrorAction SilentlyContinue
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment