Administering virtual machines with PowerShell Direct

Direct Access

Voluntary Waiver

If you want to disable PowerShell Direct, closing the gateway of access is not exactly a trivial matter. To look at the service's settings more closely, first use a simple WMI request:

> get-WmiObject -Class win32_service -Filter "name = 'vmicvmsession'"

Your first idea might be to stop the Hyper-V VM session service, since PowerShell Direct depends on that service. Unfortunately, stopping the VM session alone does not do the job. The service is equipped with a manual start mode, so every new request initializes the service afresh. You therefore have to also modify the start type:

> Set-Service -name "vmicvmsession" -startupType Disabled

Now the session service cannot be started anymore by any means, so PowerShell Direct is no longer available.

Conclusion

VMs are not always accessible through a remote connection. With PowerShell Direct, however, Microsoft provides a means for managing VMs that might not be reachable through conventional networking or remote-administration techniques.

Buy this article as PDF

Express-Checkout as PDF
Price $2.95
(incl. VAT)

Buy ADMIN Magazine

SINGLE ISSUES
 
SUBSCRIPTIONS
 
TABLET & SMARTPHONE APPS
Get it on Google Play

US / Canada

Get it on Google Play

UK / Australia

Related content

comments powered by Disqus