#PSTip Hyper-V VM Connection Authorization

Note: This tip requires PowerShell 3.0 or above.

Virtual Machine Connection Authorization allows users to connect to virtual machines using the VMConnect interface in Hyper-V (and Hyper-V RSAT tools). Virtual Machine Connection authorization is configured by a Hyper-V Administrator using the Grant-VMConnectAccess cmdlet.

Grant-VMConnectAccess -VMName TestVM -UserName domain\user1

VMConnect Authorization uses an Access Control List (ACL) that is placed inside the virtual machine configuration file. Access can also be revoked using Revoke-VMConnectAccess.

Revoke-VMConnectAccess -VMName TestVM -UserName domain\user1

With Get-VMConnectAccess you can determine which users have access to which virtual machines.

About the author: Shay Levy

Shay Levy is a Co-founder and editor of the PowerShell Magazine. He is a multiple-year recipient of the Microsoft MVP award, and a Microsoft Certified Trainer (MCT). Shay often covers PowerShell related topics on his blog and you can also follow him on Twitter at @ShayLevy

Related Posts