New-RASRDSHost
SYNOPSIS
Adds an RD Session Host server to a site.
SYNTAX
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>]DESCRIPTION
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.
EXAMPLES
Example 1
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
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
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.
PARAMETERS
-Server
A RD Session Host server FQDN or IP address.
-SiteId
The site ID to which to add the specified server.
If the parameter is omitted, the Licensing Server site ID will be used.
-Username
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
The password of the account specified in the Username parameter.
-NoInstall
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
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
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
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
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
Specifies the list of users or groups in UPN or SID format to be added to the RDSUsers Group in csv format.
CommonParameters
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.
INPUTS
None
OUTPUTS
RDSHost
RELATED LINKS
Last updated