Using PowerShell to set up Automatic Login on Windows Servers
Some server based applications require to be logged into a service account to allow an Application or service to run, These applications usually require manual intervention by systems administrators to login to the account manually after a server restart.
There are many ways to setup Automatic Logon, using “control userpasswords2” via the Run Prompt, using Third Party utilities like LogonExpert or_ Sysinternals Autologon for Windows _this simply using RegEdit and setting them manually.
I have created a PowerShell script for editing the registry to set this manually in a standardized way and could be run remotely. It is pretty simple and only requires version 1 of PowerShell.
Note: Also note following this method, the username and password are not encrypted and stored as plain text in the registry.