Restart VM VDI remotly

Craig Garland 316 Reputation points
2020-09-07T00:41:57.377+00:00

Hi Guys,

I have create a script to reboot VM (VDI) remotely. This script works with my admin account but I would like to have the script run weekly and require a more secure account. I though that the Hyper-V administrator account would let me do this but when testing It does not seem to work. get-rdconnectionBrokerhightavailability and restart-VM commands both fail.

Can anyone tell me what rights I would need to give the account to be able to run these commands and restart VM (VDI) remotely.

Thanks

Craig

Hyper-V
Hyper-V
A Windows technology providing a hypervisor-based virtualization solution enabling customers to consolidate workloads onto a single server.
2,735 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Xiaowei He 9,906 Reputation points
    2020-09-07T06:50:31.523+00:00

    Hi,

    ---Can anyone tell me what rights I would need to give the account to be able to run these commands and restart VM (VDI) remotely.

    - Account to restart VM remotely

    By default, only administrators can shut down the server remotely. Please check if add a user account to the policy "Force shutdown from a remote system" could work.

    22957-image.png

    After that the user will get the SeRemoteShutdown privilege and will be able to restart the server remotely using this command:

    shutdown -m \hamb-rds01 -r -f -t 0

    http://woshub.com/allow-prevent-non-admin-users-reboot-shutdown-windows/

    (Please note: Information posted in the given link is hosted by a third party. Microsoft does not guarantee the accuracy and effectiveness of information.)

    -Account to run the command "get-rdconnectionBrokerhightavailability"

    As far as I know, it requirements "domain admin" account to run "get-rdconnectionBrokerhightavailability".

    ------------

    Thanks for your time!
    Best Regards,
    Anne

    ------------------

    If the reply could be of help, please help to accept it as an answer, thanks for your cooperation!


Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.