skip to Main Content

I have an Azure VM Windows 10 that is set to automatically launch and automatically shutdown on a specific schedule. This works fine, but as an aside was painfully hard to set up.

The VM is set to run tasks on a schedule through Windows Task Scheduler, however it appears that the user actually needs to be logged in for some of these tasks to run. Other solutions attempted to run the tasks whether the user is logged in or not do not work (for various reasons).

So, I would like to automatically login to the VM with my account each time the VM loads up. Is this possible and if so, how do you set this up?

Thanks!

2

Answers


  1. Chosen as BEST ANSWER

    This is a downloadable solution called Autologon provided by Microsoft that I found and implemented. It works just fine.

    The details and download are available via this link:

    https://learn.microsoft.com/en-us/sysinternals/downloads/autologon

    Autologon enables you to easily configure Windows’ built-in autologon mechanism. Instead of waiting for a user to enter their name and password, Windows uses the credentials you enter with Autologon, which are encrypted in the Registry, to log on the specified user automatically.

    [!WARNING] Although the password is encrypted in the registry as an LSA secret, a user with administrative rights can easily retrieve and decrypt it. (For more information see Protecting the Automatic Logon Password )

    Autologon is easy enough to use. Just run autologon.exe, fill in the dialog, and hit Enable. The next time the system starts, Windows will try to use the entered credentials to log on the user at the console. Note that Autologon does not verify the submitted credentials, nor does it verify that the specified user account is allowed to log on to the computer.

    To turn off auto-logon, hit Disable. Also, if the shift key is held down before the system performs an autologon, the autologon will be disabled for that logon. You can also pass the username, domain and password as command-line arguments:

    autologon user domain password

    Note: When Exchange Activesync password restrictions are in place, Windows will not process the autologon configuration.


  2. Auto admin logon to the VM during start-up can be done by changing couple of registry setting. Refer to https://support.microsoft.com/en-us/help/324737/how-to-turn-on-automatic-logon-in-windows:

    To use Registry Editor to turn on automatic logon, follow these steps:

    1. Click Start, and then click Run.

    2. In the Open box, type Regedit.exe, and then press Enter.

    3. Locate the HKEY_LOCAL_MACHINESOFTWAREMicrosoftWindows
      NTCurrentVersionWinlogon subkey in the registry.

    4. Double-click the DefaultUserName entry, type your user name, and
      then click OK.

    5. Double-click the DefaultPassword entry, type your password, and then
      click OK.

      If the DefaultPassword value does not exist, it must be added. To
      add the value, follow these steps:

    -On the Edit menu, click New, and then point to String Value.

    -Type DefaultPassword, and then press Enter.

    -Double-click DefaultPassword.

    -In the Edit String dialog, type your password and then click OK.

    1. On the Edit menu, click New, and then point to String Value.

    2. Type AutoAdminLogon, and then press Enter.

    3. Double-click AutoAdminLogon.

    4. In the Edit String dialog box, type 1 and then click OK.

    5. If you have joined the computer to a domain, you should add the
      DefaultDomainName value, and the data for the value should be set
      as the fully qualified domain name (FQDN) of the domain, for
      example contoso.com..

    6. Exit Registry Editor.

    7. Click Start, click Shutdown, and then type a reason in the Comment
      text box.

    8. Click OK to turn off your computer.

    9. Restart your computer. You can now log on automatically.

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search