Run Powershell script with another user and not MidServer user
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 hours ago
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
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
2 hours ago
Hi,
This'll depend on how you're triggering the script. Is this via Flow + Integration Hub?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
an hour ago
No, just insert the record in the ECC queue.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
2 hours ago
In your script if you pass $cred parameter it will take the credential from Servicenow credential table. Something like this
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
an hour ago
Can you please give any reference record from the ServiceNow, I will try this.
