Move-RDVirtualDesktop
Move-RDVirtualDesktop
Moves a virtual desktop to a new Remote Desktop Virtualization Host (RD Virtualization Host) server.
Syntax
Parameter Set: Default
Move-RDVirtualDesktop [-SourceHost] <String> [-DestinationHost] <String> [-Name] <String> [[-ConnectionBroker] <String> ] [[-Credential] <PSCredential> ] [ <CommonParameters>]
Detailed Description
The Move-RDVirtualDesktop cmdlet moves a virtual desktop to a new Remote Desktop Virtualization Host (RD Virtualization Host) server.
Parameters
-ConnectionBroker<String>
Specifies the Remote Desktop Connection Broker (RD Connection Broker) server for a remote desktop deployment. If you do not specify a value, the cmdlet uses the fully qualified domain name (FQDN) of the local computer.
Aliases |
none |
Required? |
false |
Position? |
4 |
Default Value |
none |
Accept Pipeline Input? |
false |
Accept Wildcard Characters? |
false |
-Credential<PSCredential>
Specifies a PSCredential object that contains the user credentials for the virtual desktop. Remote Desktop Services does not require user credentials if you run the cmdlet from the source host. If you do not specify user credentials for the virtual desktop and you run the cmdlet on a remote host, the server prompts you for credentials.
Aliases |
none |
Required? |
false |
Position? |
5 |
Default Value |
none |
Accept Pipeline Input? |
false |
Accept Wildcard Characters? |
false |
-DestinationHost<String>
Specifies the fully qualified domain name (FQDN) of the new RD Virtualization Host server for the virtual desktop.
Aliases |
none |
Required? |
true |
Position? |
2 |
Default Value |
none |
Accept Pipeline Input? |
false |
Accept Wildcard Characters? |
false |
-Name<String>
Specifies the name of a virtual desktop.
Aliases |
none |
Required? |
true |
Position? |
3 |
Default Value |
none |
Accept Pipeline Input? |
false |
Accept Wildcard Characters? |
false |
-SourceHost<String>
Specifies the fully qualified domain name (FQDN) of the current RD Virtualization Host server for the virtual desktop.
Aliases |
none |
Required? |
true |
Position? |
1 |
Default Value |
none |
Accept Pipeline Input? |
false |
Accept Wildcard Characters? |
false |
<CommonParameters>
This cmdlet supports the common parameters: -Verbose, -Debug, -ErrorAction, -ErrorVariable, -OutBuffer, and -OutVariable. For more information, see about_CommonParameters (https://go.microsoft.com/fwlink/p/?LinkID=113216).
Inputs
The input type is the type of the objects that you can pipe to the cmdlet.
Outputs
The output type is the type of the objects that the cmdlet emits.
Null
This cmdlet produces no output.
Examples
Example 1: Move a Virtual Desktop to a new RD Virtualization Host Server
This example moves a virtual desktop from one RD Virtualization server to another. The commands run on the RD Connection Broker and move virtual desktops from the source host to the destination host.
The first command enables Credential Security Support Provider (CredSSP) authentication on the destination host. The Enable-WSManCredSSP cmdlet delegates the client credentials to the delegate server.
PS C:\> Enable-WSManCredSSP -Role "Client" -DelegateComputer * -Force
The second command enables CredSSP authentication on the source host. The Enable-WSManCredSSP cmdlet delegates the server credentials to the delegate server.
PS C:\> Enable-WSManCredSSP -Role "Server" -DelegateComputer * -Force
The third command gets a credential object based on the user name and password that the user enters. The command stores the results in the $Creds variable.
PS C:\> $Creds = Get-Credential
The fourth command moves the virtual desktop named "RDS-WKS-A2" from the source host named "rdvh-1.contoso.com" to the destination host named "rdvh-2.contoso.com". The command uses the credential object stored in the $Creds variable.
PS C:\> Move-RDVirtualDesktop -SourceHost "rdvh-1.contoso.com" -DestinationHost "rdvh-2.contoso.com" -Name "RDS-WKS-A2" -Credential $Creds