Welcome to TechNet Blogs Sign in | Join | Help

News

  • Welcome to the blog for the Microsoft CSS Enterprise Platforms Networking team.

    Disclaimer: All postings are provided "AS IS" with no warranties, and confer no rights. This weblog does not represent the thoughts, intentions, plans or strategies of Microsoft. Because a weblog is intended to provide a semi-permanent point-in-time snapshot, you should not consider out of date posts to reflect current thoughts and opinions.

    Blog Tools

    Add to Technorati Favorites
    Blog Flux Directory
    Computers Blogs - Blog Top Sites

    Add to Google

    Locations of visitors to this page

How to test the BITS client on your machine?

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

Posted: Thursday, August 14, 2008 8:47 PM by MichaelPlatts

Comments

Matt Johnson's Technical Adventures said:

The Old New Thing : The implementation of iterators in C# and its consequences (part 3) Notes from a

# August 21, 2008 3:21 PM

pc forum said:

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

# December 21, 2008 10:49 AM
Leave a Comment

(required) 

(required) 

(optional)

(required) 

  
Enter Code Here: Required

Comment Notification

If you would like to receive an email when updates are made to this post, please register here

Subscribe to this post's comments using RSS

Page view tracker