Notifications are globally suppressed

After reviewing the fact that no new notifications were provided by the SCCM 2012 Client for applications beeing deployed a quest for the right log-file to locate the root-cause, it was a great relief to identify all notifications beeing processed in a single log-file.

SCNotify_DOMAIN@USERNAME_1.log presents a complete history of what the user has been presented with. However, this was shown;

 

Notifications are globally suppressed, this event will not be processed by NotifyObjectInstanceBase   (Microsoft.SoftwareCenter.Client.Notification.NotifyObjectInstanceBase at IsKnownEvent)

It seems that the Computer Agent settings has a setting which doesn’t directly reveal its impact, however the documentation clearly states that it will disable notifications.

Additional software manages the deployment of applications and software updates

Enable this option only if one of the following conditions apply:

You use a vendor solution that requires this setting to be enabled.
You use the System Center 2012 Configuration Manager software development kit (SDK) to manage client agent notifications and the installation of applications and software updates.

 

It seems that reboot notifications are not impacted by this as it requires a few more tricks provided by Microsoft to suppress them.

Detection logic for MSU in SCCM 2012

I spent the day reading quite a few blog-articles relating to the detection logic for Microsofts new patching format, and howto properly output that into SCCM 2012.

Detection Method for MSU in Applications for SCCM 2012

Deploying the App-V 5.0 Client Using Configuration Manager 2012 SP1

How to create an application for deploying the App-V 5.0 Client with Configmgr 2012

SCCM 2012: Microsoft Update (MSU) als Applikation verteilen

All of the above does have a few issues though. The detection logic isn’t fulproof as a “false” one could easily error out. As I have previously written – the exit-code of a VBScript isn’t relevant when using it for Global  Conditions and the same seems to apply for Detection methods. As noted on Technet (however, for Global Conditions) the output must be through an Echo (or something similar) – which must be something for both a false and a true scenario.

Sample code;

strComputer = "."

Set objWMIService = GetObject("winmgmts:\\" & strComputer & "\root\CIMV2")

Set colItems = objWMIService.ExecQuery("SELECT * FROM Win32_QuickFixEngineering WHERE HotFixID = 'KB2506143'")

If colItems.Count = 0 Then

Wscript.StdOut.Write "False"

Wscript.Quit(0)

Else

Wscript.StdOut.Write "True"

Wscript.Quit(0)

End If

Global Conditions and VBScript

Currently my days are filled of migrating previous heavy-duty VBScripts that have provided what SCCM 2007 doesn’t have, but SCCM 2012 offers in the Application Model.

A major part of replacing VBScripts are Global Conditions within Configuration Manager 2012. And as the original script is in VBScript along with the fact that the client base is Windows XP to some extent – VBScript will prevail a bit longer even though its now wrapped within a Global Condition.

What I should have done from the start was to read about Global Conditons in the official Technet-site. There are a few gotchas and I realized that even more of the old code could have been moved to native functionality. For example – File checks can traverse the environment variable %USERPROFILE% and effectively check for a file (or folder) in all users folders on a specific target.

Now, I didn’t do this. So therefore I suffered for a day.

As the VBScripts had already been used in production I knew the quality of them was quite high in terms of achieving what I wanted – stripping them down to a specific function (remove installs and only perform a specific check for example) was easy. My first belief was that the exit-code of the script mattered. This resulted in some odd experiences, because everything ended with error.

Reading the documentation revealed that the exit-code wasn’t as relevant (should always be 0)

The value returned by the script will be used to assess the compliance of the global condition. For example, when you use VBScript, you could use the command WScript.Echo Result to return the Result variable value to the global condition.

Great – I can perform an echo! Well, obviously  this is the way togo – howelse to return a string for example?

As my initial tests involved the check that could only return true or false that was what I returned (a boolean value). VBScript outputs –1 as true. So when my boolean variable was true – the output was –1. However, SCCM was none the wiser.

Result (from DcmWmiProvider.log )

ScriptProvider::ReadDiscoveryInformation – reading discovery script definition    ScriptProvider   8/20/2013 12:41:57 AM  1428 (0x0594)

ScriptProvider::ReadDiscoveryInformation – ScriptType: 1           ScriptProvider   8/20/2013 12:41:57 AM  1428 (0x0594)

ConvertToVariant failed to convert value:-1 to Type:Boolean (0x80041005).          ScriptProvider   8/20/2013 12:41:57 AM  1428 (0x0594)

Failed in discovering instance.

Type mismatch (Error: 80041005; Source: WMI)  ScriptProvider   8/20/2013 12:41:57 AM  1428 (0x0594)

This failed completely.

If the output instead becomes the string “true” or “false (Result = “True”) – the output is handled by SCCM and can easily be converted into a Boolean (which makes the SCCM admins life my easier).

Unfortunately – the successful use of a script has no output in any logs as far as I have seen.

System Center Configuration Manager 2007

Some nice links for deploying System Center Configuration Manager 2007

http://ccmexec.com/2011/03/installing-sccm-2007-prerequisites-unattended/

http://ccmexec.com/2010/12/sccm-post-installation-checklist/

http://ccmexec.com/category/system-center-configuration-manager/page/8/

http://myitforum.com/myitforumwp/2011/11/04/configmgr-2007-two-important-changes-that-will-speed-up-cm-inbox-processing/

Automatically generate name using ConfigMgr / MDT

Using ConfigMgr with the MDT integration to deploy computers is quite common these days. It provides a certain level of automation that is quite easy to follow, however a topic that quite often comes up is how to automatically name computers during the deployment of a new client.

There are several ways – prompt the user for a name;
http://henkhoogendoorn.blogspot.com/2011/10/how-to-assign-computername-before-os.html

Use the serial number of the client to automatically generate a name;
http://www.2way.net.au/blog/post/2011/01/21/OSD-Task-Sequence-Set-Computer-Name-to-Serial-Number.aspx

Use a database to have a sequence number and prefix generate a name;
http://www.deployvista.com/Blog/JohanArwidmark/tabid/78/EntryID/120/language/sv-SE/Default.aspx

This was quite heavily developed using several other metrics (type, location etc etc)http://runebelune.blogspot.com/2011/03/generate-computer-names-in-mdt-2010sccm_30.html