Tagged: Hack

Update ConfigMgr packages with Hotfix-information

When you install a hotfix and/or a cumulative update in ConfigMgr you can select the option to let the installer create some packages.

But, those packages are missing some info… For instance Manufacturer and Version.

A quick and dirty SQL update will do the trick.

UPDATE SMSPackages_G
SET
	Version = LEFT(Replace(Source, '\\server.domain.com\SMS_ABC\hotfix\', ''), 9),
	Manufacturer = 'Microsoft',
	Language = 'All'
WHERE Source LIKE '\\server.domain.com\SMS_ABC\Hotfix%'

This is of course not supported… but afaik it works. 😀

If you want to see what would be updated, run this first

SELECT
	PkgID,
	Version AS OrgVersion,
	LEFT(Replace(Source, '\\server.domain.com\SMS_ABC\hotfix\', ''), 9) AS NewVersion,
	Manufacturer AS OrgManufacturer,
	'Microsoft' AS NewManufacturer,
	Language AS OrgLanguage,
	'All' AS NewLanguage
FROM SMSPackages_G
WHERE Source LIKE '\\server.domain.com\SMS_ABC\hotfix\%'

(And yes, you need to replace servername and sitecode)

Xperia

Atea_Pressmeddelanden

My first panel…

Shows the latest pressreleases from atea.se via a small webservice on snowland.se

Using PHP (MagpieRSS) on snowland.se and html, Javascript & CSS on the client.
The CAB is complied via “Xperia X1 html panel creator”.

Screendump

Download: Atea_Pressmeddelanden.cab

Twitter

The second one…

Another one… using Twitter API, MagpieRSS and some javascript.
Will keep it to myself since there is no configuration-option so it’s my Twitter-account only.
The CAB is complied via “Xperia X1 html panel creator”.

Screendump
screendump-twitter

PXE Filter and Obsolete Machines

There is a small problem with the PXE filter and obsolete machines.

Today the PXE-Filter scans the SCCM-database for the machine and doesn’t bother if the machine is obsolete or not… and that might result in problems (The filter adds the obsolete machine to your collection).

Since the PXE-Filter is a VBScript… you can create a small hack…

Around row 150 you will find:

bFound = False
Set oClients = oSMS.ExecQuery(sQuery)
For each oClient in oClients
	bFound = true
	iResourceID = oClient.ResourceID
	PXE.LogTrace "Found existing machine " & oClient.NetbiosName & " with ResourceID = " & iResourceID
	sNetBiosName = oClient.NetbiosName
	Exit For
Next

Change that piece of code to:

bFound = False
Set oClients = oSMS.ExecQuery(sQuery)
For each oClient in oClients
	If oClient.Obsolete = 1 Then
		PXE.LogTrace "Found obsolete machine " & oClient.NetbiosName & ", skipping"
	Else
		bFound = True
		iResourceID = oClient.ResourceID
		PXE.LogTrace "Found existing machine " & oClient.NetbiosName & " with ResourceID = " & iResourceID
		sNetBiosName = oClient.NetbiosName
		Exit For
	End If
Next

That will result In a WDSServer.log (If you turn on tracing)

[4332] 09:49:22: [WDSPXE] [Microsoft.BDD.PXEFilter] Request from 10.26.64.240:67 Len:548
[4332] 09:49:22: [WDSPXE] [Microsoft.BDD.PXEFilter] About to run script
[4332] 09:49:22: [WDSPXE] [Microsoft.BDD.PXEFilter] Processing request from MAC address = 00:1E:0B:34:0F:E7, IP address = 0.0.0.0, UUID = E11832C1-58C0-DC11-BBDA-0B340FE7001E
[4332] 09:49:22: [WDSPXE] [Microsoft.BDD.PXEFilter] Found obsolete machine RIRO003, skipping
[4332] 09:49:22: [WDSPXE] [Microsoft.BDD.PXEFilter] Found existing machine RIRO003 with ResourceID = 112
[4332] 09:49:22: [WDSPXE] [Microsoft.BDD.PXEFilter] Added new membership rule to collection B0100012