Get-RDVirtualDesktop
Get-RDVirtualDesktop
Gets a list of virtual desktops in the remote desktop deployment.
Syntax
Parameter Set: Default
Get-RDVirtualDesktop [[-CollectionName] <String[]> ] [-ConnectionBroker <String> ] [ <CommonParameters>]
Detailed Description
The Get-RDVirtualDesktop cmdlet gets a list of virtual desktops in the remote desktop deployment.
Parameters
-CollectionName<String[]>
Specifies an array of names of personal virtual desktop collections.
Aliases |
none |
Required? |
false |
Position? |
1 |
Default Value |
none |
Accept Pipeline Input? |
True (ByPropertyName) |
Accept Wildcard Characters? |
false |
-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? |
named |
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.
- System.Object
Examples
Example 1: Retrieve a list of Virtual Desktops
This command lists virtual desktops in the collections associated with the connection broker server named "rdcb.contoso.com." The command uses the pipeline operator to send the results to the Sort-Object cmdlet, which sorts the objects in order of the VirtualDesktopName property.
PS C:\> Get-RDVirtualDesktop -ConnectionBroker "rdcb.contoso.com" | sort-object VirtualDesktopName
Example 2: Retrieve a list of Virtual Desktops in a Collection
This command lists virtual desktops in the collection named "Virtual Desktop pool" that is associated with the connection broker server named "rdcb.contoso.com."
PS C:\> Get-RDVirtualDesktop -ConnectionBroker "rdcb.contoso.com" -CollectionName @("Virtual Desktop pool")