Hyper-V cmdlets without Administrator rights

This topic contains 1 reply, has 2 voices, and was last updated by  Don Jones 3 years, 7 months ago.

  • Author
    Posts
  • #14479

    AlbertWa
    Participant

    Hi
    I have a Hyper-V Server (named HV1) where the user UserA is "Hyper-V Administrators", but not part of the Administrators Group. From another server (SV2), which is virtualized (in another Hyper-V server HV3), I would like to run Powershell scripts, which manage the virtual machines under HV1 using the UserA.

    Problem: I cannot use "Powershell Implicit remoting" (http://technet.microsoft.com/en-us/magazine/ff720181.aspx) as UserA is not in the Administrators Group in HV1. The cmdlet New-PSSession requires to be in the Administrators Group. And I cannot install the role "Hyper-V Sever" under SV2, as the server is virtualized.

    I there any way to tell Powershell to give remote access only to the cmdlets, we have the rights (in my case "Hyper-V Administrators")?
    The cmdlet

    I found the following library "http://pshyperv.codeplex.com/", which seems to work. But as it is not really maintained (last update Aug 2009), I would prefer to use an "official" way :=)

    I use Powershell 3.0 and all servers are Windows Server 2012.

    Thank you in advance for your help

  • #15309

    Don Jones
    Keymaster

    PowerShell doesn't "know" what cmdlets you have access to, so no.

    Read "Secrets of PowerShell Remoting." It explain how permissions work to connect to a Remoting endpoint (you don't need to be a member of local Administrators; there's another group, by default, that also provides access). You may need to set up a custom endpoint to do what you wany.

You must be logged in to reply to this topic.