Hi there, im unable to restart my VM (WIN7 32 BIT) from my host (win8 63 bit) I get error "PS C:> Restart-Computer win7
Restart-Computer : Failed to restart the computer win7 with the following error message: Access is denied. (Exception
from HRESULT: 0x80070005 (E_ACCESSDENIED)).
At line:1 char:1
Restart-Computer win7
I had PS remoting enabled on bothe machines,however it still doesnt work. Could you please help!
Also, does this mean psremoting is enabled?
what does , WinRM already is set up to receive requests on this machine.
Set-WSManQuickConfig : Access is denied.
At line:50 char:33
PS C:\Windows\system32> Enable-PSRemoting
WinRM Quick Configuration
Running command “Set-WSManQuickConfig” to enable this machine for remote management through WinRM service.
This includes:
1. Starting or restarting (if already started) the WinRM service
2. Setting the WinRM service type to auto start
3. Creating a listener to accept requests on any IP address
4. Enabling firewall exception for WS-Management traffic (for http only).
Do you want to continue?
[Y] Yes [A] Yes to All [N] No [L] No to All [S] Suspend [?] Help (default is “Y”): a
WinRM already is set up to receive requests on this machine.
Set-WSManQuickConfig : Access is denied.
At line:50 char:33
Your error output seems pretty clear, did you read it?
To clarify the question: Are you on some computer, trying to restart another computer (that happens to be a VM)?
Like Don mentioned, permissions or connectivity. Given that you’re getting access denied, permissions seem likely…
Ignore the fact that this is a VM. How do you restart another computer? You need privileges to do this. Same deal here, doesn’t matter if the VM is on your computer.
Unless your PowerShell session somehow has access to this remote computer (e.g. through domain privileges), you’re not going to have access to restart it. If your hypervisor (Hyper-V?) supports it, you might be able to use a command like ‘Restart-VM’, that works around these privilege requirements by using an agent on the VM.