Friday, 28 September 2012

OnContentAvailable program 0x80091007


When deploying software to a collection the client execmgr.log shows the following error:

OnContentAvailable program 0x80091007

You will notice a hash mismatch also " SoftDistAdvertHashMismatchEvent" - when checking the CAS.log you will see

"Hash matching failed."


SCCM is a temperamental bitch


Goto the package in question and right click on Distribution Points and click "Manage Distribution Points".  Choose "Update all distribution points with a new package source version" - and thats exactly what happens.
Kick of a hardware policy cycle on the client and watch the magic.

Wednesday, 26 September 2012

SCCM using wrong drive as distribution share

Due to the unnecessarily greedy nature of SCCM if when you create a package distribution point there is more than one drive available to the server it will always opt for the drive with most space.

Our server has 3 drives:

C:\ = 50GB System Drive (for OS etc)
D:\ = 200GB Data Drive (for package storage etc)
P:\ = 50GB Page File (it's an old VM)

It got to the point where our data drive got to 151GB capacity (49GB free) and discovered that the P:\ drive actually had 50GB available.... So it helped its self and created an SMSPKGP$ folder and proceeded to fill it up.

Then when P:\ got to 10GB free it realsied that C:\ had about 40GB free and proceeded to create a SMSPKG$ folder and so on and so forth.

This only became apparent to me after it had been utilising this space for a while so I discovered a nice little easter egg that isn't widely publicised by M$.

If there are drives on your SCCM server you don't want it to use simply create a file on the root of the drive named


I've seen various versions of this listed on different sites such as "nosmsondrive.sms"; let me tell you now - this doesn't work (or didn't for me).

I know now that the correct syntax is NO_SMS_ON_DRIVE.SMS as I had a "Install retrying" notice on an AppV package DP install and it stuck until I deleted this file.

Hope this can help someone else one day...


Tuesday, 25 September 2012

Armed forces hits

Really proud to be getting hits from the boys and girls overseas in the forces.

I hope my posts can help you and in turn I thank you for all the hard work you are all doing.

Be safe!


Turn on logging for MSI installs

If you ever install from MSI's (which I'm sure you do) it can be handy to turn on logging so you can see the outcome - particularly handy if the install is failing.

Use the following code after your package.MSI and then a log file will be generated at the location you choose:

msiexec /i Packagename.msi /l*v c:\logname.log

Tuesday, 18 September 2012

Drop Box

I need some more DropBox space - please sign up here using my referral link and install it so I get some more space :D

Cheers loyal readers :)

Wednesday, 12 September 2012

PXE & OSD Builds Failing - conflicting records

If you have ever had issues with your PXE boot failing when you try to rebuild a machine that already exists within SCCM then this may help you out.

I'd been spilling over this one on and off for a while when I discovered that these machines were appearing in "Conflicting Records". 

Conflicting Records within SCCM console

You have a few options here.  We can get SCCM to manage conflicting records by chaging the setting site wide:

  1. Navigate to System Center Configuration Manager / Site Database / Site Management / <site code> - <site name>
  2.  Right-click <site code> - <site name> and then click Properties
  3. Under the "Advanced" tab, you can choose Manually resolve conflicting records or Automatically create new client records for duplicate hardware IDs.
  4. OK
Another option is to manually resolve conflicting records:

From conflicting records as above select the conflicting record and look in the actions pain and you will see  few options:
  1.  Merge - combines the new record with the existing one merging together
  2. New - creates a brand new record for the conflict
  3. Block - creates a new record but blocks it
Then there is another really cool way of doing it!!

  •  Save this into a file called "Merge.vbs" to somewhere of your choice - we will be using it in  a few steps time - don't forget to check your formatting if you copy and paste - the "quotes" can sometimes 'mess up' etc
Dim swbemLocator
Dim swbemServices


Sub Main()
Dim oProviderLocation
Dim oLocation
Dim oReg
Dim oPendingRegs
    Set swbemLocator = CreateObject("WbemScripting.SWbemLocator")
    swbemLocator.Security_.AuthenticationLevel = 6 'Packet Privacy.
    Set swbemServices = swbemLocator.ConnectServer(".", "root\SMS")
    Set oProviderLocation = swbemServices.InstancesOf("SMS_ProviderLocation")
    For Each oLocation In oProviderLocation
        If oLocation.ProviderForLocalSite = True Then
            Set swbemServices = swbemLocator.ConnectServer(oLocation.Machine, "root\sms\site_" + oLocation.SiteCode)
        End If       

    Set oPendingRegs = swbemServices.ExecQuery("SELECT * FROM SMS_PendingRegistrationRecord")
    For Each oReg In oPendingRegs
        Resolve 1, oReg.SMSID

End Sub

Sub Resolve(action, SMSID)
Dim InParams
    Set InParams = swbemServices.Get("SMS_PendingRegistrationRecord").Methods_("ResolvePendingRegistrationRecord").InParameters.SpawnInstance_
    InParams.Action = action
    InParams.SMSID = SMSID

    swbemServices.ExecMethod "SMS_PendingRegistrationRecord","ResolvePendingRegistrationRecord", InParams
End Sub

  • Ensure that conflicting records on the advanced tab of site properties is still set to "Manually Resolve Conflicting Records"
  • Create a new status filter rule with the following properties: 
Message ID: 2642

  • On the actions tab select "run a program" and specify the above script we created.  If on a x64 server you may need to specify the full path to "cscript.exe" i.e. C:\Windows\SysWOW64\cscript.exe C:\SCCMTools\Merge.vbs”
Relying on the status filter rule will mean that the script will only run when it detects the 2642 event however you can run the script manually if you want to tidy up what is already there.

I have to thank a great SCCM consultant; Dean Lockwood at BDS services for this - although he will tell you it was my inspiration that prompted the outcome ;)