Skip to content

Commit 1d74356

Browse files
authored
Merge pull request #9534 from v-tappelgate/AB#6973-Blocking-users-from-running-Hyper-V-and-VMware-virtual-machines
AB#6973: Blocking users from running Hyper-V and VMware virtual machines
2 parents e197387 + 275d1a5 commit 1d74356

2 files changed

Lines changed: 74 additions & 0 deletions

File tree

support/windows-server/toc.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2754,6 +2754,8 @@ items:
27542754
items:
27552755
- name: Antivirus exclusions for Hyper-V hosts
27562756
href: ./virtualization/antivirus-exclusions-for-hyper-v-hosts.md
2757+
- name: Block users from running Hyper-V and VMware virtual machines on workstation-class computers
2758+
href: ./virtualization/block-users-from-running-virtualization-features-on-specific-computers.md
27572759
- name: Issues when starting VM or installing Hyper-V
27582760
href: ./virtualization/bios-update-for-hyper-v.md
27592761
- name: Run programs on non-Microsoft hardware virtualization software
Lines changed: 72 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,72 @@
1+
---
2+
title: How to Block Users from Running Hyper-V and VMware Virtual Machines on Workstation-class Computers
3+
description: Describes how to block users from installing Hyper-V or other virtualization software on specific computers.
4+
ms.date: 08/15/2025
5+
manager: dcscontentpm
6+
audience: itpro
7+
ms.topic: troubleshooting
8+
ms.reviewer: kaushika
9+
ms.custom:
10+
- sap:virtualization and hyper-v\installation and configuration of hyper-v
11+
- pcy:WinComm Storage High Avail
12+
---
13+
14+
# Block users from running Hyper-V and VMware VMs on workstation-class computers
15+
16+
This article provides guidance for how to use Windows PowerShell or Group Policy to block users from running virtualization software, such as Hyper-V and VMware, on workstation-class computers. These procedures apply to scenarios in which you want to prevent virtualization software from running on both domain-joined and non-domain-joined computers, regardless of a user's administrative permissions.
17+
18+
*Applies to:* Hyper-V Server 2019
19+
20+
## How to block virtualization services
21+
22+
> [!IMPORTANT]
23+
>
24+
> - Before you make these changes in a production environment, test them in a lab environment. This step helps make sure that the changes (especially Group Policy changes) produce the intended results and don't introduce operational issues.
25+
> - Make sure that you have Administrator permissions on the workstation computers.
26+
27+
### How to block the Hyper-V feature on a single computer
28+
29+
1. On the computer, open an administrative Windows PowerShell window.
30+
1. Run the following cmdlets, in sequence:
31+
32+
```powershell
33+
Disable-WindowsOptionalFeature -Online -FeatureName Microsoft-Hyper-V-All
34+
bcdedit /set hypervisorlaunchtype off
35+
```
36+
37+
The first cmdlet removes Hyper-V from the set of available optional features. The second cmdlet prevents Hyper-V from running.
38+
39+
### How to use Group Policy to block Hyper-V services on multiple computers
40+
41+
To configure an appropriate policy, follow these steps:
42+
43+
1. In the Group Policy Management Console (GPMC), navigate to or create a Group Policy Object (GPO) that applies to the affected computers.
44+
1. Right-click the GPO, and then select **Edit**. In the Group Policy Editor, select **Computer Configuration** > **Windows Settings** > **Security Settings** > **System Services**.
45+
1. Configure each service that's related to Hyper-V (for example, Hyper-V Virtual Machine Management). For each of these services, follow these steps:
46+
1. Right-click the service, and then select **Properties**.
47+
1. In the **Properties** dialog box, select **Define this policy setting**, select **Disabled**, and then select **OK**.
48+
1. To propagate the policy change, restart all the target computers.
49+
50+
For more information about how to use Group Policy, see [Advanced Group Policy Management](/microsoft-desktop-optimization-pack/agpm/).
51+
52+
## How to use Group Policy to block VMware Workstation services
53+
54+
To configure an appropriate policy, follow these steps:
55+
56+
1. In the GPMC, navigate to or create a GPO that applies to the affected computers.
57+
1. Right-click the GPO, and then select **Edit**. In the Group Policy Editor, select **Computer Configuration** > **Policies** > **Windows Settings** > **Security Settings** > **System Services**.
58+
59+
To block users from running VMware Workstation, follow these steps:
60+
61+
1. Create a path rule in **Software Restriction Policies**:
62+
63+
1. Open the GPMC, and go to **Computer Configuration** > **Policies** > **Policies** > **Windows Settings** > **Software Restriction Policies**.
64+
1. If there aren't any software restriction policies, right-click **Software Restriction Policies**, and then select **New Software Restriction Policies**.
65+
1. Right-click **Additional Rules**, and then select **New path rule**.
66+
1. In the **Path** box, specify the path to the VMware executable files (for example, type *C:\\Program Files (x86)\\VMware\\*, or enter the path to specific .exe files).
67+
1. Select **Security level**, and then select **Disallowed**.
68+
1. Select **OK**.
69+
70+
1. To propagate the policy change, restart all the target computers.
71+
72+
For more information about how to use Group Policy, see [Advanced Group Policy Management](/microsoft-desktop-optimization-pack/agpm/).

0 commit comments

Comments
 (0)