Disable-WmsVirtualDesktopRole
Disables a Hyper-V virtual desktop role.
Syntax
Default (Default)
Disable-WmsVirtualDesktopRole
[-Restart]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
Description
The Disable-WmsVirtualDesktopRole cmdlet switches all stations from Virtual Desktop Infrastructure (VDI) mode to Remote Desktop Session Host (RDSH) mode, and then uninstalls the Hyper-V virtual desktop role. The system reboots to apply the changes if you specify the Restart parameter.
Examples
Example 1: Disable a virtual desktop
PS C:\> Disable-WmsVirtualDesktopRole -Restart
This command switches all stations from Remote Desktop Virtualization Host (RDVH) sessions to RDSH sessions, removes the Hyper-V virtual desktop role, and automatically restarts the computer to apply the changes.
Parameters
-Confirm
Prompts you for confirmation before running the cmdlet.
Parameter properties
| Type: | SwitchParameter |
| Default value: | False |
| Supports wildcards: | False |
| DontShow: | False |
| Aliases: | cf |
Parameter sets
(All)
| Position: | Named |
| Mandatory: | False |
| Value from pipeline: | False |
| Value from pipeline by property name: | False |
| Value from remaining arguments: | False |
-Restart
Indicates that this operation automatically restarts the computer to apply the change.
Parameter properties
| Type: | SwitchParameter |
| Default value: | None |
| Supports wildcards: | False |
| DontShow: | False |
Parameter sets
(All)
| Position: | Named |
| Mandatory: | False |
| Value from pipeline: | False |
| Value from pipeline by property name: | False |
| Value from remaining arguments: | False |
-WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.
Parameter properties
| Type: | SwitchParameter |
| Default value: | False |
| Supports wildcards: | False |
| DontShow: | False |
| Aliases: | wi |
Parameter sets
(All)
| Position: | Named |
| Mandatory: | False |
| Value from pipeline: | False |
| Value from pipeline by property name: | False |
| Value from remaining arguments: | False |
CommonParameters
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable, -ProgressAction, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.