- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-08-2017 07:41 AM
As part of an Employee onboarding process, we want to create and enable a share for a home drive on a remote server. We have credentials that give us Domain Admin rights (don't ask - it just is that way) but are unable to get a powershell script to be able to access the administrative share on the server. We get back "Access is Denied"
for a test, running the following command results in "Access is Denied" while running it from a regular powershell environment works and return
Get-ChildItem \\Servername\d$\Users
This is a bit frustrating, and I hope that someone could help out.
Thanks!
Solved! Go to Solution.
- Labels:
-
Orchestration
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-08-2017 02:39 PM
We found a "solution"
The Orchestration MidServer Service was running as Local Service. We set the login to the SVC.SnowOrc user and then we could access the share.
Seems like this is what all the Credentials should have done, but... Live and learn I guess.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-08-2017 08:51 AM
Hi Brian,
If your Get-ChildItem command giving results from MID Server then do the following things.
1) Try to run your MID Server service with the credential you mentioned( The one having domain admin rights)
2) In your ServiceNow PowerShell activity change your target host as MID Server IP.
3) Try run the command again
Let me know if that works.
Regards,
Vivek
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-08-2017 09:40 AM
Thanks for the quick reply.
I tried that and got the following error output:
Authentication failure(s) with available Windows credentials from the instance. Credentials tried: ******\SVC.SnowOrc,SVC.snoworc@*******.com,*******\hpsim
Access is deniedStack Trace: at Microsoft.PowerShell.Commands.FileSystemProvider.ItemExists(String path, ErrorRecord& error)
When run directly on the midserver:
PS C:\Users\SVC.SNOWOrc> Get-ChildItem \\Servername\d$
Directory: \\Servername\d$
Mode LastWriteTime Length Name
---- ------------- ------ ----
d---- 10/23/2013 11:58 AM app
d---- 8/1/2012 12:52 PM ArchiveStaging
d---- 5/10/2017 9:04 AM DFSRoots

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-08-2017 10:45 AM
Hi Brian,
Usually, when you give target host as MID Server, ServiceNow always use MID Server credential to run any commands. It won't even check another credential in the credential table.
Make sure you have marked Use MID Server service credential is true.
Regards,
Vivek
Based on the impact hit like, helpful or correct
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-08-2017 02:39 PM
We found a "solution"
The Orchestration MidServer Service was running as Local Service. We set the login to the SVC.SnowOrc user and then we could access the share.
Seems like this is what all the Credentials should have done, but... Live and learn I guess.