Enable AutoAdminLogon For Windows Deployments

There are 3 registry keys that admins in the Windows world use to enable automatic logins, often required for deployments that require a logged in user to setup user environments, such as configuring app deployments as part of a mass deployment.
The required keys in the registry are:
HKLM:\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon’ -Name DefaultUserName -Value “Krypted\Administrator”
HKLM:\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon’ -Name DefaultPassword -Value pass
HKLM:\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon’ -Name AutoAdminLogon -Value 1
Once set as above the administrator on the domain krypted will automatically authenticate with a password of pass. To put this into a powershell script: