Set-RASRDSDefaultSettings
SYNOPSIS
Modifies default settings used to configure an RD Session Host server.
SYNTAX
Set-RASRDSDefaultSettings [-AllowRemoteExec <bool>]
[-AllowURLAndMailRedirection {Disabled | Enabled | EnabledWithAppRegistration}]
[-AutoPreferredConnectionBroker <SwitchParameter>] [-DisconnectActiveSessionAfter <uint>]
[-DragAndDropMode {Disabled | ClientToServer | ServerToClient | Bidirectional}]
[-DriveRedirectionFileCache {None | ReadAhead | ReadAheadWriteBehind}]
[-EnableAppMonitoring <bool>] [-EnableDriveRedirectionCache <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[]>] [-LogoffDisconnectedSessionAfter <uint>]
[-ManageRDPTransportProtocol {Disabled | BothUDPTCP | OnlyTCP | EitherUDPTCP}]
[-MaxSessions <uint>] [-MaxUserProfileDiskSizeGB <uint>] [-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[]>] [-SiteId <uint>]
[-SupportShellURLNamespaceObjects <bool>]
[-Technology {DoNotManage | UPD | FSLogix | FSLogixProfileContainer}] [-UPDiskPath <string>]
[-UPDMode {DoNotChange | Enabled | Disabled}] [-UPDRoamingMode {Exclude | Include}]
[-UseRemoteApps <bool>] [<CommonParameters>]DESCRIPTION
Modifies default settings used to configure 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.
Default settings are defined on a site level and are applied to an RD Session Host server when it is initially added to the site.
To retrieve the current defaults settings, use the Get-RASRDSDefaultSettings cmdlet.
EXAMPLES
Example 1
Modifies the default value of the MaxSessions property for the specified site.
PARAMETERS
-SiteId
Site ID for which to modify the default RD Session Host server settings.
-Port
Specifies the RD Session Host agent port number.
-MaxSessions
Specifies the 'Maximum Sessions' option.
-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 mail and URL 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.
-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.
-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)
-AllowRemoteExec
Enable or disable the 'Allow 2XRemoteExec to send command to the client' option.
-EnableAppMonitoring
Enable or disable the 'Enable 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
-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.
-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.
To specify the list of users, use the RestrictedUsers parameter.
-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
None
OUTPUTS
None
RELATED LINKS
Last updated