Set-RASRDSHost
SYNOPSIS
Modifies RD Session Host server settings.
SYNTAX
Set-RASRDSHost [-Id] <uint> [-AllowRemoteExec <bool>]
[-AllowURLAndMailRedirection {Disabled | Enabled | EnabledWithAppRegistration}]
[-AutoPreferredConnectionBroker <SwitchParameter>] [-Description <string>]
[-DirectAddress <string>] [-DisconnectActiveSessionAfter <uint>]
[-DragAndDropMode {Disabled | ClientToServer | ServerToClient | Bidirectional}]
[-DriveRedirectionFileCache {None | ReadAhead | ReadAheadWriteBehind}]
[-EnableAppMonitoring <bool>] [-Enabled <bool>] [-EnableDriveRedirectionCache <bool>]
[-EnablePrinting <bool>] [-EnableTWAIN <bool>] [-EnableWIA <bool>] [-EnableZOrder <bool>]
[-ExcludeFilePath <string[]>] [-ExcludeFolderPath <string[]>] [-FileTransferAutoCloseWindow <bool>]
[-FileTransferExistingFileMode {CreateNewFile | OverwriteExistingFile}]
[-FileTransferLocation <string>] [-FileTransferLockLocation <bool>]
[-FileTransferMode {Disabled | ClientToServer | ServerToClient | Bidirectional}]
[-FileTransferSuppressPromptForUploadFiles <bool>] [-IncludeFilePath <string[]>]
[-IncludeFolderPath <string[]>] [-InheritDefaultAgentSettings <bool>]
[-InheritDefaultAppPackageSettings <bool>] [-InheritDefaultDesktopAccessSettings <bool>]
[-InheritDefaultOptimizationSettings <bool>] [-InheritDefaultPrinterSettings <bool>]
[-InheritDefaultUserProfileSettings <bool>] [-LogoffDisconnectedSessionAfter <uint>]
[-ManageRDPTransportProtocol {Disabled | BothUDPTCP | OnlyTCP | EitherUDPTCP}]
[-MaxSessions <uint>] [-MaxUserProfileDiskSizeGB <uint>] [-NewServer <string>] [-Port <uint>]
[-PreferredConnectionBrokerId <uint>] [-PreferredConnectionBrokerObj <ConnectionBroker>]
[-PrinterNameFormat {PrnFormat_PRN_CMP_SES | PrnFormat_SES_CMP_PRN | PrnFormat_PRN_REDSES}]
[-RemoveClientNameFromPrinterName <bool>] [-RemoveSessionNumberFromPrinterName <bool>]
[-RestrictDesktopAccess <bool>] [-RestrictedUsers <string[]>]
[-SupportShellURLNamespaceObjects <bool>]
[-Technology {DoNotManage | UPD | FSLogix | FSLogixProfileContainer}] [-UPDiskPath <string>]
[-UPDMode {DoNotChange | Enabled | Disabled}] [-UPDRoamingMode {Exclude | Include}]
[-UseRemoteApps <bool>] [<CommonParameters>]DESCRIPTION
Modifies settings of an RD Session Host server.
For each setting, the cmdlet has a corresponding input parameter. To modify a setting, specify a matching parameter and its value.
EXAMPLES
Example 1
Disables the specified RD Session Host server in the Licensing Server site.
Example 2
Disables the RD Session Host server specified by ID.
Example 3
Enables the RD Session Host server specified by the $RDS variable, which is an object of type RDS.
The object is obtained using the Get-RASRDSHost cmdlet.
Example 4
Enables the RD Session Host server represented by an RDS object obtained from the pipeline output.
PARAMETERS
-Server
The name of the target RD Session Host server.
This must be the actual server name used in the RAS farm.
-SiteId
Site ID in which to modify the specified RD Session Host server.
If the parameter is omitted, the site ID of the Licensing Server will be used.
-Id
The ID of the RD Session Host server to modify. To obtain the ID, use the Get-RASRDSHost cmdlet.
-InputObject
The RD Session Host servers to modify.
To obtain an object of type RDS representing a RD Session Host server, use the Get-RASRDSHost cmdlet.
Type reference: RDSHost
-Enabled
Enable or disable the specified RD Session Host server in a site.
-NewServer
A new server name. This must be either the server's FQDN or IP address.
-Description
A user-defined RD Session Host server description.
-DirectAddress
Specifies the RD Session Host server direct address.
-InheritDefaultAgentSettings
Enable or disable the 'Inherit default agent settings' option. This will inherit RD Session Host agent settings from the default profile.
If you would like to specify custom settings, you need to disable this option and specify the desired parameters.
-InheritDefaultPrinterSettings
Enable or disable the 'Inherit default printer settings' option. This will inherit RD Session Host printer settings from the default profile.
If you would like to specify custom settings, you need to disable this option and specify the desired parameters.
-InheritDefaultUserProfileSettings
Enable or disable the 'Inherit default user profile settings' option. This will inherit RD Session Host User Profile settings from the default profile.
If you would like to specify custom settings, you need to disable this option and specify the desired parameters.
-InheritDefaultDesktopAccessSettings
Enable or disable the 'Inherit default desktop access settings' option. This will inherit RD Session Host Desktop Access settings from the default profile.
If you would like to specify custom settings, you need to disable this option and specify the desired parameters.
-InheritDefaultOptimizationSettings
Enable or disable the 'Inherit default Optimization Settings' option. This will inherit Image Optimization settings from the default profile.
If you would like to specify custom settings, you need to disable this option and specify the desired parameters.
-InheritDefaultAppPackageSettings
Enable or disable the 'Inherit default App Package Settings' option. This will inherit Application Packages from the default profile.
If you would like to specify custom settings, you need to disable this option and specify the desired parameters.
-Port
Specifies the port number for the RD Session Host agent.
-MaxSessions
Specifies the 'Maximum Sessions' property.
-DisconnectActiveSessionAfter
Disconnect active session after (in seconds). Accepted values: 20-1641600 seconds; 0 for 'Never'.
-LogoffDisconnectedSessionAfter
Logoff disconnected session after (in seconds). Accepted values: 20-1641600 seconds; 0 for 'Never'; 1 for 'Immediate'.
-AllowURLAndMailRedirection
Specifies the 'Allow Client URL/Mail Redirection' option. Accepted values: Disabled, Enabled, EnabledWithAppRegistration (Enable with app registration).
Possible values: Disabled, Enabled, EnabledWithAppRegistration
Type reference: AllowURLAndMailRedirection
-SupportShellURLNamespaceObjects
Enable or disable the 'Support Shell URL Namespace Objects' option.
-AllowRemoteExec
Enable or disable the 'Allow 2XRemoteExec to send command to the client' option.
-EnableAppMonitoring
Enable or disable the 'Application Monitoring' option.
-UseRemoteApps
Enable or disable the 'Use RemoteApps if available' option.
-FileTransferMode
File Transfer option. Possible values are: 0 (Disabled), 1 (client to Server only), 2 {Server To Client only), 3 (Bidirectional).
Possible values: Disabled, ClientToServer, ServerToClient, Bidirectional
Type reference: FileTransferControlMode
-FileTransferLocation
Location where the File Transfer takes place, if and where it is allowed.
-FileTransferLockLocation
Lock Location where the File Transfer takes place, if and where it is allowed.
-FileTransferSuppressPromptForUploadFiles
Specifies if the 'Suppress prompt for upload files' option is enabled or disabled.
-FileTransferExistingFileMode
Specifies the behavior when a file with the same name already exists in the destination folder during file transfer.
Possible values: CreateNewFile, OverwriteExistingFile
Type reference: FileTransferExistingFileMode
-FileTransferAutoCloseWindow
Specifies if the "Close transfer window when complete" option is enabled or disabled.
-DragAndDropMode
Specifies the mode the client server drag and drop feature will operate.
Possible values: Disabled, ClientToServer, ServerToClient, Bidirectional
Type reference: DragAndDropModeValue
-ManageRDPTransportProtocol
Manage RDP transport protocol.
Possible values: Disabled, BothUDPTCP, OnlyTCP, EitherUDPTCP
Type reference: ManageRDPTransportProtocol
-EnablePrinting
Enables or disables Universal Printing on the RD Session Host server.
In the RAS console, this option is toggled on the Universal Printing tab page in the Universal Printing category.
-EnableTWAIN
Enable or disable TWAIN (Universal Scanning) on the RD Session Host server.
In the RAS console, this option is toggled on the TWAIN tab page in the Universal Scanning category.
-EnableWIA
Enable or disable WIA (Universal Scanning) on the RD Session Host server.
In the RAS console, this options is toggled on the WIA tab page in the Universal Scanning category.
-PrinterNameFormat
Specifies the 'Printer Name Format' option. Accepted values: PrnFormat_PRN_CMP_SES, PrnFormat_SES_CMP_PRN, PrnFormat_PRN_REDSES.
Possible values: PrnFormat_PRN_CMP_SES, PrnFormat_SES_CMP_PRN, PrnFormat_PRN_REDSES
Type reference: PrnNameFormat
-RemoveClientNameFromPrinterName
Enable or disable the 'Remove client name from printer name' option.
-RemoveSessionNumberFromPrinterName
Enable or disable the 'Remove session number from printer name' option.
-AutoPreferredConnectionBroker
Set the 'Preferred Connection Broker' option to 'Automatically".
-PreferredConnectionBrokerObj
The preferred Connection Broker
To obtain an object of type Broker representing the preferred Connection Broker, use the Get-RASConnectionBroker cmdlet.
Type reference: ConnectionBroker
-PreferredConnectionBrokerId
The preferred Connection Broker ID.
-EnableDriveRedirectionCache
Enable or disable the 'Enable Drive Redirection Cache' option.
-DriveRedirectionFileCache
Specifies the 'File Cache' mode to be used with drive redirection.
Possible values: None, ReadAhead, ReadAheadWriteBehind
Type reference: DriveRedirectionFileCacheMode
-EnableZOrder
Enable or disable the 'Enable Z-Order' option. (Experimental)
-Technology
Specifies the 'User Profile Technology' value.
Possible values: DoNotManage, UPD, FSLogix, FSLogixProfileContainer
Type reference: UserProfileTech
-UPDMode
Specifies the 'User Profile Disk Mode' option. Accepted values: DoNotChange, Enabled, Disabled.
Possible values: DoNotChange, Enabled, Disabled
Type reference: UPDMode
-UPDRoamingMode
Specifies the 'UPD Roaming Mode' option. Accepted values: Exclude, Include.
Possible values: Exclude, Include
Type reference: UPDRoamingMode
-UPDiskPath
Specifies the User Profile Disk path.
-MaxUserProfileDiskSizeGB
Specifies the max user profile disk size (in GB).
-IncludeFolderPath
Specifies the UPD 'Include' folder paths.
-IncludeFilePath
Specifies the UPD 'Include' file paths.
-ExcludeFolderPath
Specifies the UPD 'Exclude' folder paths.
-ExcludeFilePath
Specifies the UPD 'Exclude' file paths.
-RestrictDesktopAccess
Enable or disable the 'Restrict direct desktop access to the following users' option.
Use the RestrictedUsers parameter to specify the list of users.
-RestrictedUsers
Specifies the list of users for the RestrictDesktopAccess option (the option should be enabled).
The list can contain user account names and user SIDs.
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
RDSHost
OUTPUTS
None
RELATED LINKS
Last updated