powershellscripts.com

Tutorials  PowerShell Cmdlet Help for Get-BitsTransfer



NAME
Get-BitsTransfer

SYNOPSIS
Retrieves the associated BitsJob object for an existing Background Intelligent Transfer Service (BITS) transfer job
.

SYNTAX
Get-BitsTransfer [[-Name] ] [[-AllUsers]] []

Get-BitsTransfer [-JobId] []


DESCRIPTION
The Get-BitsTransfer cmdlet retrieves a set of BITS transfer jobs. By default, the cmdlet returns the jobs that are
owned by the current user. However, if you have administrative credentials, you can specify the AllUsers paramete
r so that the command returns jobs that are owned by all users. The returned jobs can be filtered by name or ID. Th
e jobs are represented by BitsJob objects.


PARAMETERS
-AllUsers []
Returns BITS transfer jobs that are owned by all users. If this parameter is not specified, only jobs that are
owned by the current user are returned. This parameter requires administrative credentials.

Required? false
Position? 2
Default value Current
Accept pipeline input? false
Accept wildcard characters? false

-JobId
Filters the returned BITS jobs by job ID. Only the BITS jobs that include a job ID in this array are returned.
If BitsJob objects are piped to this cmdlet, their job IDs are used as the values of this parameter.

Required? true
Position? 1
Default value
Accept pipeline input? true (ByPropertyName)
Accept wildcard characters? false

-Name
Filters the returned BITS jobs based on job name. Only BITS jobs with job names that match a name in this array
are returned. You can use standard wildcard characters such as the asterisk (*) and the question mark (?). Or
, you can use a range operator such as"[a-r]".

For example, you can use any of the following commands:

Get-BitsTransfer -Name "BITS*"
Get-BitsTransfer -Name "BITS Transfe?"
Get-BitsTransfer -Name "BITS Transfe[a-r]"

A combination of the wildcard character and range operators is also possible.

Required? false
Position? 1
Default value
Accept pipeline input? false
Accept wildcard characters? false


This cmdlet supports the common parameters: Verbose, Debug,
ErrorAction, ErrorVariable, WarningAction, WarningVariable,
OutBuffer and OutVariable. For more information, type,
"get-help about_commonparameters".

INPUTS
Microsoft.BackgroundIntelligentTransfer.Management.BitsJob[]
This cmdlet accepts one or more BitsJob objects as input that populates the JobId parameter (based on the prope
rty name).


OUTPUTS
Microsoft.BackgroundIntelligentTransfer.Management.BitsJob[]
This cmdlet generates the BitsJob objects that are associated with the retrieved BITS transfer jobs.


NOTES





-------------------------- EXAMPLE 1 --------------------------

C:\PS>Get-BitsTransfer

JobId DisplayName TransferType JobState OwnerAccount
----- ----------- ------------ -------- ------------
07acbe90-7d25-4d05-a... TestJob2 Download Suspended DOMAIN01\user01
c0dd3d8c-c3a2-4562-8... TestJob1 Download Transferred DOMAIN01\user01
1ef8c549-7a92-4173-b... BitsJobTransfer Download Transferred DOMAIN01\user01
2c8302d5-3f44-4981-8... BitsJobTransfer Download Transferred DOMAIN01\user01


Description
-----------
This command returns all the BitsJob objects that are owned by the current user.





-------------------------- EXAMPLE 2 --------------------------

C:\PS>Get-BitsTransfer -JobId C0DD3D8C-C3A2-4562-80B19224879C

JobId DisplayName TransferType JobState OwnerAccount
----- ----------- ------------ -------- ------------
c0dd3d8c-c3a2-4562-8... TestJob1 Download Transferred DOMAIN01\user01


Description
-----------
This command returns the BitsJob object that is identified by the specified job ID.





-------------------------- EXAMPLE 3 --------------------------

C:\PS>Get-BitsTransfer -AllUsers -Name *Microsoft*, *Windows*

JobId DisplayName TransferType JobState OwnerAccount
----- ----------- ------------ -------- ------------
07acbe90-7d25-4d05-a... MicrosoftTest Download Suspended DOMAIN01\user01
c0dd3d8c-c3a2-4562-8... WindowsTest Download Transferred DOMAIN01\user02


Description
-----------
This command returns all the BitsJob objects, owned by all users, where the DisplayName property of the BitsJob obj
ect contains either "Microsoft" or "Windows". If the user does not have administrative credentials, this command re
turns an error because it uses the AllUsers parameter.





-------------------------- EXAMPLE 4 --------------------------

C:\PS>Get-BitsTransfer -Name testjob1

JobId DisplayName TransferType JobState OwnerAccount
----- ----------- ------------ -------- ------------
c0dd3d8c-c3a2-4562-8... TestJob1 Download Transferred DOMAIN01\user01


Description
-----------
This command returns the BitsJob object that is identified by the specified display name.






RELATED LINKS
Online version: http://go.microsoft.com/fwlink/?LinkId=141429
Add-BitsFile
Complete-BitsTransfer
Remove-BitsTransfer
Resume-BitsTransfer
Set-BitsTransfer
Start-BitsTransfer
Suspend-BitsTransfer