Saturday, 23 June 2012

Checking BITs health on SCCM site servers with PowerShell

On a number of occasions I discovered that the BITs configuration in IIS has become corrupt resulting in SCCM agents being unable to submit new software and\or hardware inventory. There are no errors reported in any client logs, in fact the client logs give the impression that the MIF files were submitted to the site server successfully. If you enable IIS logging on the site server you will see error 501 log entries appear. This issue can also be confirmed by trying to view the BITs settings for the default website in IIS. The purpose of this script is to assist in easy identification of MP's where BITs is broken.

How to manually check BITs on an MP with PowerShell command:
  1. Open PowerShell as an administrator from the start-menu.
  2. Start-BitsTransfer -source .\Test-Bits.txt -dest http://[SCCMServerMP]/CCM_Incoming/test-bits.txt -TransferType Upload

Note: The above command requires a text file created locally which can be copied to the site server. If BITs is broken on the SCCM site server then the transfer will fail. You should manually delete the copied text file from the CCM_Incoming folder on the site server after the test is complete.

How to check multiple MP's with a PowerShell script:
  1. Copy the script to any local folder.
  2. Open PowerShell  as an administrator from the start-menu.
  3. Type ‘Set-executionpolicy remotelysigned’ and agree to prompt with 'Y’
  4. Run the script from any location using an explicit path.
                  e.g. ‘help .\Test-SCCMBitsTransfer.ps1  -full' to view syntax examples.

Note: To view script information and syntax type in the PowerShell shell:
              'help  Test-SCCMBitsTransfer.ps1 -full

Solution to a broken BITs client on a MP (link)
Fix MP fails to re-install on a site Reset
501 Errors found in IIS logs: 
Error seen in IIS when checking BITs settings:
Running the PowerShell Script:

PowerShell Script: Test-SCCMBitsTransfer.ps1

Below are links to a couple of my other blog posts that describe the method I would recommend to correct management point or BITs errors.

Fix MP fails to re-install on a site Reset;postID=9068478152764659215

SCCM - Unable to enable BITs on an IIS virtual directory.;postID=4941805560145335979

No comments:

Post a Comment