Join the #BuildWithBuildAgent Challenge! Get recognized, earn exclusive swag, and inspire the ServiceNow Community with what you can build using Build Agent.  Join the Challenge.

Run Powershell script with another user and not MidServer user

Najmuddin Mohd
Mega Sage

Hello,

We are trying to trigger a PowerShell script from ServiceNow.
The PowerShell Script is written on the Server which reset the password of the AD User.

But, the PowerShell script runs with the MidServer user who has only Log on as Service, it does not have any privileges to run the command and we are getting the error as User does not have access.

We want to run the PowerShell command with a user who has access to run script and not as MidServer user. We will store the user credentials in ServiceNow.

How this can be achived?


Regards,
Najmuddin

5 REPLIES 5

You can find it within MID Server script files. There are many examples

VivekSattanatha_0-1762963617972.png