header
header Register : : Login header
header
divider
menuleft
menuright
submenu
left

We have a new sponsor!  Introducting Pragma Systems.  See the home page for details.

PowerShell.exe access denied on Hyper-V Server R2
Last Post 13 Dec 2009 07:06 PM by mehendran. 2 Replies.
Printer Friendly
Sort:
PrevPrev NextNext
You are not authorized to post a reply.
Author Messages Not Resolved
mehendranUser is Offline
New Member
New Member
Posts:2
Avatar

--
13 Dec 2009 06:43 PM  
I enabled powershell feature on the Hyper-V Server 2008 R2. This enabling created the directory c:\windows\system32\windowspowershell\v1.0\ where I can find powershell.exe.
I am able to run powershell.exe command through command line manually.

When c:\windows\system32\windowspowershell\v1.0\powershell.exe is accessed remotely via java program or whatever, it throws 'The system cannot find the file specified'.

In both the cases, I am running the command within the Hyper-V machine. However, in the RMI case, I am initiating the call from the remote machine. I could not find any difference in these.

I have a couple of .ps1 scripts. What I wish to do is too simple. I want to just execute them from remote machine with powershell.exe command using RMI.

While I looked into it more, I came to know that the permissions on the folder seems to be restricted. Even with an administrator privilege we could not access the folder v1.0. This problem happens on the Hyper-v Server R2 after I enabled the powershell.exe manually. The powershell enabling creates the folder c:\windows\system32\windowspowershell\v1.0\* as I mentioned before. The created folders are like system generated. I tried my level best to change the permissions on it. I am able to change only for WindowsPowerShell not for v1.0. So as for external programs, the directory seem to be not existing. Has anybody come across the problem?

I used cacls/icacls commands to grant permissions. It is helpless. Or is there any other possible ways to open access to other programs like I wish to do.

I would appreciate your kind help on this.
marco.shawUser is Offline
Site Moderator
Advanced Member
Advanced Member
Posts:593
Avatar

--
13 Dec 2009 06:54 PM  
Never seen or heard of this problem. I'll load Hyper-V Server R2 in a VM and try to have a check. I don't have a system to check this, so it is going to be Hyper-V Server R2 on a 2008 Server R2 server with Hyper-V. I might not be able to load a VM (inside the VM), but can check the permissions.

Now, there are different potential issues with trying to call powershell.exe directly remotely. I don't know if RMI will be able to make calls to the process remotely...

It could take a me a few days to look into this...
Marco

*Microsoft MVP - Windows PowerShell
https://mvp.support.microsoft.com/profile/Marco.Shaw
*Co-Author - Sams Windows PowerShell Unleashed 2nd Edition
*Blog - http://marcoshaw.blogspot.com
mehendranUser is Offline
New Member
New Member
Posts:2
Avatar

--
13 Dec 2009 07:06 PM  
Hi macro.shaw!

Thanks for the reply. I have verified with Hyper-V on Windows 2008 R2. It is working fine. The problem lies in only with Hyper-V Server R2. Though I use RMI, I am still an admin to run the java program which in turn invokes the powershell command. I have tried with giving the absolute path of the command. The invoked process could not locate the path which really exists. It says 'The system cannot find the file specified'.
You are not authorized to post a reply.

Active Forums 4.1
right
   
footer Sponsored by Quest Software • SAPIEN Technologies • Compellent • Microsoft Windows Server 2008 footer
footer