New-RASRDSHost
Adds an RD Session Host server to a site.
New-RASRDSHost [-Server] <string> [[-SiteId] <uint>] [-AddUsersToRDSUsers <string[]>] [-NoDesktopExperience <SwitchParameter>] [-NoFireWallRules <SwitchParameter>] [-NoInstall <SwitchParameter>] [-NoRestart <SwitchParameter>] [-NoTerminalServices <SwitchParameter>] [<CommonParameters>]
New-RASRDSHost [-Server] <string> [[-SiteId] <uint>] -Password <SecureString> -Username <string> [-AddUsersToRDSUsers <string[]>] [-NoDesktopExperience <SwitchParameter>] [-NoFireWallRules <SwitchParameter>] [-NoRestart <SwitchParameter>] [-NoTerminalServices <SwitchParameter>] [<CommonParameters>]
Adds an RD Session Host server to a site.
The RD Session Host agent will be installed on the server by default. You can optionally skip the agent installation by including the -NoInstall parameter.
-Server <string> A RD Session Host server FQDN or IP address.
-SiteId <uint> The site ID to which to add the specified server.
If the parameter is omitted, the Licensing Server site ID will be used.
-Username <string> An administrator account for push installing the RD Session Host agent on the server.
If this parameter is omitted, your RAS admin username (and password) will be used.
-Password <SecureString> The password of the account specified in the Username parameter.
-NoInstall <SwitchParameter> Specifies not to install the RD Session Host agent on the server.
If this parameter is omitted, the agent will be push installed on the server using your RAS admin credentials.
To specify different credentials for push installation, specify the Username and Password parameters.
-NoRestart <SwitchParameter> Specifies not to restart the server after the RD Session Host agent is installed.
If this parameter is omitted, the server will be restarted if required.
-NoFireWallRules <SwitchParameter> Specifies not to add firewall rules to allow the RDS Host Agent to communicate.
If this parameter is omitted, the firewall rules will not be added.
-NoDesktopExperience <SwitchParameter> Specifies not to install the Desktop Experience after the RD Session Host agent is installed.
If this parameter is omitted, the Desktop Experience is installed.
-NoTerminalServices <SwitchParameter> Specifies not to install the Terminal Services role after the RD Session Host agent is installed.
If this parameter is omitted, the Terminal Services role will be installed.
-AddUsersToRDSUsers <string[]> Specifies the list of users or groups in UPN or SID format to be added to the RDSUsers Group in csv format.
<CommonParameters>
-none-
---------- EXAMPLE 1 ----------
New-RASRDSHost "server.company.dom"
Adds the specified RD Sessions Host server to the Licensing Server site (default).
The RD Session Host agent will be installed on the server using your RAS admin credentials (default). ---------- EXAMPLE 2 ----------
New-RASRDSHost -Server "server.company.dom" -SiteId 2 -Username "myname" -Password $pass
Adds the specified RD Session Host server to the specified site.
The -Username and -Password parameters specify credentials, which will be used to push install the RD Session Host agent on the server. ---------- EXAMPLE 3 ----------
New-RASRDSHost "server.company.dom" -NoInstall
Adds the specified RD Session Host server to the Licensing Server site (default).
The RD Session Host agent will not be installed on the server.
You can skip the agent installation if it's already installed on the server.