![]() |
psexec with Text File - Access Denied Error |
Post Reply
|
| Author | |
tbalci
Newbie
Joined: 19 September 2012 Location: Istanbul Status: Offline Points: 2 |
Post Options
Thanks(0)
Quote Reply
Topic: psexec with Text File - Access Denied ErrorPosted: 19 September 2012 at 9:54am |
|
Hello,
I have a file servers.txt under C:\Users\user_name\servers.txt. I want to execute "winrm quickconfig -q" command as follows: psexec -h \\@"C:\users\user_name\Desktop\servers.txt" -u domain\domainadmin_user_name -p Pa$$w0rd cmd "winrm quickconfig -q" However, it fails with error: Error opening C:\users\user_name\Desktop\servers.txt: Access is denied. There are no problems in accessing the txt file nor the credentials. It seems that the problem is elsewhere, but could not figure out. Any ideas? Thank you in advance.
Edited by tbalci - 19 September 2012 at 11:52am |
|
![]() |
|
spatters
Newbie
Joined: 27 September 2012 Status: Offline Points: 12 |
Post Options
Thanks(0)
Quote Reply
Posted: 27 September 2012 at 3:50pm |
|
Are you running as the user whose desktop you're trying to access?
Maybe you're not running with elevated credentials ("as administrator")?
|
|
![]() |
|
WindowsStar
Senior Member
Joined: 30 June 2010 Status: Offline Points: 503 |
Post Options
Thanks(0)
Quote Reply
Posted: 08 October 2012 at 8:03pm |
Please no SPAM, how does this tool help with the problem. Plus this tool is useless, why pay for something that you can do for free. Windows Command Prompt, VBScript, CMD Script, and PowerShell all can do this for free. Please don't post something that is not helpful. Thanks -WS
|
|
![]() |
|
aaronmar
Moderator Group
Joined: 13 July 2010 Status: Offline Points: 58 |
Post Options
Thanks(0)
Quote Reply
Posted: 09 October 2012 at 2:45am |
|
I assume "servers.txt" contains the list of servers on which you want to run the command? In that case, you shouldn't have the leading backslashes before the @ sign. Also, if you are running PsExec.exe without admin rights (e.g., from an admin/elevated Command Prompt) and under a different user account, PsExec probably won't be able to read servers.txt from another user's desktop. Try putting servers.txt into a common location (e.g., \users\public\documents). Finally, I would put the -h option after the computer, user and password options and before the command you want to run. (I can't remember whether that matters, but I've always put the computer specifier first...)
Hope this helps.
|
|
|
-- Aaron Margosis (Microsoft)
co-author of The Windows Sysinternals Administrator's Reference. http://www.amazon.com/Windows-Sysinternals-Administrators-Reference-Russinovich/dp/073565672X |
|
![]() |
|
Post Reply
|
|
|
Tweet
|
| Forum Jump | Forum Permissions ![]() You cannot post new topics in this forum You cannot reply to topics in this forum You cannot delete your posts in this forum You cannot edit your posts in this forum You cannot create polls in this forum You cannot vote in polls in this forum |