How to test the BITS client on your machine?

How to test the BITS client on your machine?

  • Comments 2
  • Likes

Now let’s look at a series of Bitsadmin commands used to create a BITS job and download a file. These commands are used to test the BITS client side and verify it works.

1. Create a download job called bitstest by typing the following in the directory where Bitsadmin resides:

Bitsadmin /create /download bitstest 

2. Add the file you want to get and where to copy it to by typing the following:

Bitsadmin /addfile bitstest  http://go.microsoft.com/fwlink/?LinkID=18922 c:\MSSecure.cab 

3. Set your proxy settings to be the same as your IE settings:

Bitsadmin /setproxysettings bitstest preconfig 

4. Check the job to make sure it's in a suspended state:

Bitsadmin /info bitstest /verbose 

5. Set the job to go by typing:

Bitsadmin /resume bitstest

6. View the job again to make sure it’s in a state of Transferred:

Bitsadmin /info bitstest /verbose 

7. To complete the job which will take the bits temp file and write it to the location you specified in step 2, type:

Bitsadmin /complete bitstest 

Once you have completed these steps, you should see a file named MSSecure.cab in the root of the C: drive.

Listed below is an example of the commands described above being run on Windows Server 2008 using Bitsadmin 3 and the output from each command:

C:\Users\testuser>Bitsadmin /create /download bitstest

BITSADMIN version 3.0 [ 7.0.6001 ]
BITS administration utility.
(C) Copyright 2000-2006 Microsoft Corp.

Created job {026C1A35-4608-4A54-AC31-2B632522BC7B}.

C:\Users\testuser>Bitsadmin /addfile bitstest http://go.microsoft.com/fwlink/?
LinkID=18922 c:\MSSecure.cab

BITSADMIN version 3.0 [ 7.0.6001 ]
BITS administration utility.
(C) Copyright 2000-2006 Microsoft Corp.

Added http://go.microsoft.com/fwlink/?LinkID=18922 -> c:\MSSecure.cab to job.

C:\Users\testuser>Bitsadmin /setproxysettings bitstest preconfig

BITSADMIN version 3.0 [ 7.0.6001 ]
BITS administration utility.
(C) Copyright 2000-2006 Microsoft Corp.

Proxy usage set to PRECONFIG.
C:\Users\testuser>Bitsadmin /info bitstest /verbose

BITSADMIN version 3.0 [ 7.0.6001 ]
BITS administration utility.
(C) Copyright 2000-2006 Microsoft Corp.

GUID: {026C1A35-4608-4A54-AC31-2B632522BC7B} DISPLAY: 'bitstest'
TYPE: DOWNLOAD STATE: SUSPENDED OWNER: DOMAIN\testuser
PRIORITY: NORMAL FILES: 0 / 1 BYTES: 0 / UNKNOWN
CREATION TIME: 8/6/2008 6:16:19 PM MODIFICATION TIME: 8/6/2008 6:16:33 PM
COMPLETION TIME: UNKNOWN ACL FLAGS:
NOTIFY INTERFACE: UNREGISTERED NOTIFICATION FLAGS: 3
RETRY DELAY: 600 NO PROGRESS TIMEOUT: 1209600 ERROR COUNT: 0
PROXY USAGE: PRECONFIG PROXY LIST: NULL PROXY BYPASS LIST: NULL
DESCRIPTION:
JOB FILES:
        0 / UNKNOWN WORKING http://go.microsoft.com/fwlink/?LinkID=18922 -> c:\MSSecure.cab
NOTIFICATION COMMAND LINE: none
Peercaching flags
         Enable download from peers      :false
         Enable serving to peers         :false
CUSTOM HEADERS: NULL

C:\Users\testuser>Bitsadmin /resume bitstest

BITSADMIN version 3.0 [ 7.0.6001 ]
BITS administration utility.
(C) Copyright 2000-2006 Microsoft Corp.

Job resumed.

C:\Users\testuser>Bitsadmin /info bitstest /verbose

BITSADMIN version 3.0 [ 7.0.6001 ]
BITS administration utility.
(C) Copyright 2000-2006 Microsoft Corp.

GUID: {026C1A35-4608-4A54-AC31-2B632522BC7B} DISPLAY: 'bitstest'
TYPE: DOWNLOAD STATE: TRANSFERRING OWNER: DOMAIN\testuser
PRIORITY: NORMAL FILES: 0 / 1 BYTES: 68468 / 366823
CREATION TIME: 8/6/2008 6:16:19 PM MODIFICATION TIME: 8/6/2008 6:16:37 PM
COMPLETION TIME: UNKNOWN ACL FLAGS:
NOTIFY INTERFACE: UNREGISTERED NOTIFICATION FLAGS: 3
RETRY DELAY: 600 NO PROGRESS TIMEOUT: 1209600 ERROR COUNT: 0
PROXY USAGE: PRECONFIG PROXY LIST: NULL PROXY BYPASS LIST: NULL
DESCRIPTION:
JOB FILES:
        68468 / 366823 WORKING http://go.microsoft.com/fwlink/?LinkID=18922 -> c:\MSSecure.cab
NOTIFICATION COMMAND LINE: none
Peercaching flags
         Enable download from peers      :false
         Enable serving to peers         :false
CUSTOM HEADERS: NULL

C:\Users\testuser>Bitsadmin /complete bitstest

BITSADMIN version 3.0 [ 7.0.6001 ]
BITS administration utility.
(C) Copyright 2000-2006 Microsoft Corp.

Job completed.

C:\Users\testuser>

- Wayne Melvin

Your comment has been posted.   Close
Thank you, your comment requires moderation so it may take a while to appear.   Close
Leave a Comment
  • The Old New Thing : The implementation of iterators in C# and its consequences (part 3) Notes from a

  • Great post, explained really well and I could really understand. Thank you.