Remote Desktop Cmdlets in Windows PowerShell
Windows PowerShell® is a task-based command-line shell and scripting language designed especially for system administration. This reference topic for the information technology (IT) professional provides assistance in utilizing the Windows PowerShell cmdlets to script and automate tasks.
Remote Desktop Services Cmdlets
This reference provides cmdlet descriptions and syntax for all Remote Desktop Service-specific cmdlets. It lists the cmdlets in alphabetical order based on the verb at the beginning of the cmdlet.
Cmdlet | Description |
---|---|
Adds an RDS server to a Remote Desktop deployment. |
|
Adds one or more RD Session Host servers to a session collection. |
|
Adds virtual desktops to a virtual desktop collection. |
|
Prevents the RD Connection Broker server from reusing existing Active Directory (AD) computer accounts. |
|
Disconnects a user from a session that runs on a remote server. |
|
Configures the RD Connection Broker server to reuse existing AD DS computer accounts. |
|
Exports the current associations between users and personal virtual desktops to a file. |
|
Retrieves a list of publishable applications from a collection. |
|
Gets certificates associated with RDS roles. |
|
Gets high availability settings for the RD Connection Broker server in a Remote Desktop deployment. |
|
Gets configuration settings for the RD Gateway for a Remote Desktop deployment. |
|
Displays the file extensions associated with a RemoteApp program. |
|
Retrieves the current settings for the RD Licensing server and the licensing mode of the Remote Desktop deployment. |
|
Retrieves a list of personal virtual desktops and associated user accounts. |
|
Gets a patch schedule for a virtual desktop. |
|
Gets RemoteApp programs in a Remote Desktop deployment. |
|
Gets published Remote Desktop connections. |
|
Gets RDS servers in a Remote Desktop deployment. |
|
Gets session collections in a Remote Desktop deployment. |
|
Gets configuration information for a session collection. |
|
Gets a list of RD Session Host servers in a session collection. |
|
Gets a list of all user sessions in a collection or in a Remote Desktop deployment. |
|
Gets a list of virtual desktops in the remote desktop deployment. |
|
Gets a list of virtual desktop collections in a remote desktop deployment. |
|
Gets configuration settings of a virtual desktop collection. |
|
Gets the status of a job on a virtual desktop collection. |
|
Gets the number of virtual desktops that RDS can create in parallel. |
|
Gets the number of idle virtual desktops on hosts. |
|
Gets the export path setting of the virtual desktop template. |
|
Gets the workspace name for a Remote Desktop deployment. |
|
Grants the Remote Desktop Connection Broker (RD Connection Broker) server access to one or more organizational units (OUs) in a given domain of Active Directory Domain Services (AD DS). |
|
Imports associations between user accounts and personal virtual desktops from a text file. |
|
Ends a user session and closes all running applications. |
|
Moves a virtual desktop to a new Remote Desktop Virtualization Host (RD Virtualization Host) server. |
|
Creates a certificate for an RDS role. |
|
Creates a patch schedule for a personal virtual desktop. |
|
Publishes a RemoteApp program to a Remote Desktop deployment. |
|
Creates a session collection of RD Session Host servers. |
|
Installs the required role services for session-based desktop deployment. |
|
Creates a new virtual desktop collection. |
|
Installs role services for Virtual Desktop Infrastructure. |
|
Removes the association between a personal virtual desktop and a user. |
|
Removes a patch schedule from a personal virtual desktop. |
|
Removes a RemoteApp program. |
|
Removes a server from a Remote Desktop deployment. |
|
Removes a session collection from a Remote Desktop deployment. |
|
Removes one or more RD Session Host servers from a session collection. |
|
Removes a virtual desktop collection. |
|
Removes virtual desktops from a virtual desktop collection. |
|
Sends a system message to a specified user session. |
|
Sets the active Remote Desktop Connection Broker (RD Connection Broker) server, or management server, in a remote desktop deployment. |
|
Imports and secures a certificate to use with an RDS role. |
|
Sets a DNS name that clients use to connect to a Remote Desktop deployment. |
|
Sets high availability settings for RD Connection Broker servers for a Remote Desktop deployment. |
|
Configures the database connection string for the SQL Server database used in high availability environments. |
|
Specifies settings for the RD Gateway server for a Remote Desktop deployment. |
|
Changes the file type association of a RemoteApp program in a Remote Desktop deployment. |
|
Defines settings for the RD Licensing server and the licensing mode of the Remote Desktop deployment. |
|
Creates an association between a personal virtual desktop and a user account. |
|
Changes patch schedule settings for a personal virtual desktop. |
|
Modifies configuration settings for a RemoteApp program. |
|
Changes whether to publish a Remote Desktop to a collection. |
|
Modifies configuration options for an existing session collection. |
|
Configures one or more RD Session Host servers in a session collection. |
|
Changes configuration settings for a virtual desktop collection. |
|
Sets the number of virtual desktops that RDS can create in parallel. |
|
Sets the maximum number of idle virtual desktops on host servers. |
|
Sets the export path for virtual desktop templates. |
|
Assigns a workspace name for a Remote Desktop deployment. |
|
Stops a job on a virtual desktop collection. |
|
Verifies that the Remote Desktop Connection Broker (RD Connection Broker) server can access an Active Directory Domain Services (AD DS) organizational unit (OU). |
|
Detects whether the RD Connection Broker server is configured to reuse existing AD DS computer accounts. |
|
Associates a virtual desktop collection with a new virtual desktop template. |
Notes
To list all the cmdlets that are available, use the Get-Command –Module RemoteDesktopServices
cmdlet.
For more information about, or for the syntax of, any of the cmdlets, use the Get-Help
<cmdlet name> cmdlet, where <cmdlet name> is the name of the cmdlet that you want to research. For more detailed information, you can run any of the following cmdlets:
● Get-Help
<cmdlet name> -Detailed
● Get-Help
<cmdlet name> -Examples
● Get-Help
<cmdlet name> -Full