Modify the properties of an existing Background Intelligent Transfer Service (BITS) transfer job.
Syntax Set-BitsTransfer [-BitsJob] BitsJob [-Authentication string] [-Credential PSCredential] [-Description string] [-DisplayName string] [-Priority string] [-ProxyAuthentication string] [-ProxyBypass string] [-ProxyCredential PSCredential] [-ProxyList Uri] [-ProxyUsage string] [-RetryInterval int] [-RetryTimeout int] [-SetOwnerToCurrentUser] [-Confirm] [-WhatIf] [CommonParameters] Key -BitsJob BitsJob The BITS transfer job(s) to modify. Pipe a value to this parameter from other cmdlets that return BitsJob objects, such as Get-BitsTransfer. -Authentication string The authentication mechanism to be used at the server. Possible values: Basic Send the username and password in clear text to the server or proxy. Digest A challenge-response scheme using a server-specified data string. NTLM A challenge-response scheme using the Windows credentials of the user for domain authentication. Negotiate A challenge-response scheme that negotiates with the server or proxy to determine which scheme to use. For example: Kerberos or NTLM. Passport Use Windows Live ID as the authentication mechanism (live.com). -Credential PSCredential The credentials to use to authenticate the user at the server. The default is the current user. Type a user name, such as "User64", "Domain64\User64" or "User@example.com". Or use Get-Credential to create the value for this parameter. When you type a user name, you will be prompted for a password. -Description string Up to 1024 characters. -DisplayName string The display name provides a user-friendly way to differentiate BITS transfer jobs. -Priority string Set the priority of the BITS transfer job, which affects bandwidth usage. Background transfers use the idle network bandwidth of the client computer to transfer files. valid values: Foreground Transfer the job in the foreground. (highest priority) Foreground transfers compete for network bandwidth with other applications, which can impede the user's overall network experience. However, if Start-BitsTransfer is being used interactively, this is likely the best option. High Transfer the job in the background with a high priority. Normal Transfer the job in the background with a normal priority. Low Transfer the job in the background with a low priority.(lowest priority) -ProxyAuthentication string The authentication mechanism to be used at the server. Possible values: Basic Send the username and password in clear text to the server or proxy. Digest A challenge-response scheme using a server-specified data string. NTLM A challenge-response scheme using the Windows credentials of the user for domain authentication. Negotiate A challenge-response scheme that negotiates with the server or proxy to determine which scheme to use. For example: Kerberos or NTLM. Passport Use Windows Live ID as the authentication mechanism (live.com). -ProxyBypass string A list of host names to use for a direct connection. The hosts in the list are tried in order until a successful connection is achieved. Specifying this parameter bypasses the proxy. If this parameter is used, the -ProxyUsage parameter must be set to Override. -ProxyCredential PSCredential The credentials to use to authenticate the user at the proxy. Use Get-Credential to create a value for this parameter. -ProxyList Uri A list of proxies to use. The proxies in the list are tried in order until a successful connection is achieved. If this parameter is used, the -ProxyUsage parameter must be set to Override. -ProxyUsage string The proxy usage settings. Possible values: SystemDefault Use the system default proxy settings. NoProxy Do not use a proxy to transfer the files. Use this option to transfer files within a local area network (LAN). AutoDetect Automatically detect proxy settings. BITS detects proxy settings for each file in the job. Override Specify the proxies or servers to use. If the -ProxyList parameter is also specified, the proxies in that list are used. If the -ProxyBypass parameter is also specified, the servers in that list are used. In both cases, the first member of the list is used. If the first member is unreachable, the subsequent members are tried until a member is contacted successfully. -RetryInterval int The minimum length of time, in seconds, that BITS waits before trying to transfer the file after BITS encounters a transient error. The minimum allowed value is 60 seconds. If this value exceeds the RetryTimeout value from the BitsJob object, BITS will not retry the transfer. Instead, BITS sets the state of the BITS transfer job to the Error state. The default is 600 seconds (10 minutes). -RetryTimeout int The length of time, in seconds, that BITS tries to transfer the file after the first transient error occurs. Setting the retry period to 0 prevents retries. If the retry period value exceeds the JobInactivityTimeout Group Policy setting (90-day default), BITS cancels the job. The default value is 1,209,600 seconds (14 days). -SetOwnerToCurrentUser Set the owner of the BITS transfer job to the current user. -Confirm Prompt for confirmation before executing the command. -WhatIf Describe what would happen if you executed the command, without actually executing the command. CommonParameters: -Verbose, -Debug, -ErrorAction, -ErrorVariable, -WarningAction, -WarningVariable, -OutBuffer -OutVariable.
Set-BitsTransfer modifies the properties of an existing BITS transfer job. Specify the job to modify with the -BitsJob parameter or pass it through the pipeline.
Modify the priority of an existing BITS transfer job:
PS C:\> $myJob = Get-BitsTransfer -JobId 399a6f60-6a86-4e19-8295-60596019913c
Set-BitsTransfer -BitsJob $myJob -Priority High
Retrieve a BITS transfer job and use the current users credentials to authenticate the user at the (autodetected) proxy server:
PS C:\> $myJob = Get-BitsTransfer -JobId 076cf8bb-5f79-409a-9d13-14cfd21f3bac
PS C:\> $keys = Get-Credential
PS C:\> Set-BitsTransfer -BitsJob $myJob -ProxyUsage AutoDetect -ProxyAuthentication $keys
Retrieve all the BitsJob objects owned by the current user, modify them to set an explicit list of proxy server and bypassed host names:
PS C:\> Get-BitsTransfer | Set-BitsTransfer -ProxyUsage Override -ProxyList http://proxy1,http://proxy2:81 -ProxyBypass http://directconnect
“In this world of change, nothing which comes stays, and nothing which goes is lost” ~ Anne Sophie Swetchine (1782-1857)
Complete-BitsTransfer - Complete a BITS transfer
Get-BitsTransfer - Get a single or multiple BITS transfer
BITS PowerShell cmdlets