Skip to main content

Windows - Run Service as Specified User

Summary

This script will start a specified service with a specific user account. It works for both domain and local user accounts.

Time Saved by Automation: 10 Minutes

Sample Run

Sample Run

User Parameters

NameExampleRequiredDescription
usernamepronocTrueThe username whose authentication is required to run the service
password*********TrueThe password to authenticate to run the service
servicenamewuauservTrueThe service that is required to run with the provided user credentials

Process

This script will start a specified service with a specific user account. It works for both domain and local user accounts. The script will also attempt to restart the service after the logon account change and verify the result accordingly.

Output

  • Script log