- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-24-2018 08:13 AM
Hi folks,
I've got a small script which should ideally populate users into the security tab of an active directory group object.
Unfortunately, the script only works locally when it is "Run as Administrator" when I try to run this locally in a Powershell Window.
The first few lines of my script are used to re-open a prompt as admin, which also works locally, but doesn't seem to work when initiating it as a powershell activity from ServiceNow.
The active directory credentials plugged into ServiceNow have admin rights but, alas, the script seems to return the same error as if I would run it without an elevated prompt.
Would anybody be able to help in either running a Powershell command as Admin from ServiceNow, or happen to know another solution that might help in doing the same thing?
Solved! Go to Solution.
- Labels:
-
Orchestration
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-22-2018 08:16 AM
Hi drewm,
Afraid not. Looks like it isn't possible through ServiceNow from the looks of things.
In the end we've ended up setting up a scheduled task locally to run through and pick up and do the bits that needed elevated rights.
It isn't tidy and doesn't use ServiceNow as a solution, but does what we're after at least.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-22-2018 07:54 AM
Hey Shawn, were you able to figure out the "Run As Administrator" issue? We're looking at a different issue, but similar to yours our script runs fine when you run the PowerShell as an administrator on the local machine. It doesn't work in ServiceNow though.
Thanks!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-22-2018 08:16 AM
Hi drewm,
Afraid not. Looks like it isn't possible through ServiceNow from the looks of things.
In the end we've ended up setting up a scheduled task locally to run through and pick up and do the bits that needed elevated rights.
It isn't tidy and doesn't use ServiceNow as a solution, but does what we're after at least.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-22-2018 08:20 AM
Thanks for the update! It's unfortunate, but glad it works.