« Previous 1 2
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.
« Previous 1 2
Buy this article as PDF
(incl. VAT)