top of page

OUR PRECONDITIONS

  • The old network infrastructure, referred to as OldNet:
    Doesn’t support 802.1x.
    Two domains on different VLAN’s with a one way trust, referred to as Enterprise and Educational.
    The two domains have their own network infrastructure, different IP Helpers, DNS, DHCP and so on.

  • The new infrastructure, referred to as NewNet:
    802.1x is required using CISCO ISE and Layer 3 switches.
    Only one fallback net with its own IP range, common for both domains, which also supports WebAuth guest access.
    The two domains still have their own IP range, DHCP, DNS etc. but will use the same PXE-server since PXE boot is taking place on the fallback network.

  • Both the old and the new network infrastructure will be used to deploy Windows 10 x64 and Windows 7 x86.

  • MAB will not be used during OSD, the network team don’t want to spread a special OSD VLAN so clients will get an IP address according to its current location and only certificate-based authentication is allowed.

  • The task sequence needs to support both the new computer and refresh scenario as well as BIOS to UEFI conversion regardless of the currently installed operating system.
    The scripts used for managing 802.1x needs to support Windows 7 and its PowerShell version.

Search
Writer's picturesomeguy100

Create a custom status message and use its data as arguments to a server side command.

Updated: Mar 9, 2020


Status filter rules has been around for ages so that's not what this post is about. This post is about using the same functionality but whenever you want to by sending a MessageID of your choice, customizing the information sent and using that information as arguments to a command.



Most rules I’ve seen have been triggered by a fail or success event during a sequence and has been used to send or create some kind of report of the outcome.

Event Fail=11170

Event Succeeded=11171

The commandline for the script could look like this:

“TSOutcome.vbs /ComputerName:%msgsys /ProgramSuccess:Yes”


Useful? Sure, but very limited and %msgsys is a predefined variable.



But what if you want to do something else in the middle of an OSD, like setting variables to the Computer-Resource running the TS?

Well, you can.


There are a number of tools out there that can help you.

StatGen by 2Pint Software (although it’s not working too well in WinPE with multiple MP’s) and the tool we use, OneVinn’s SCCM Console Extension which is great, just to mention two.


So went back and took a look at some stuff I played around with some time ago and here’s the result.



This command:


With this rule:


Will look like this in the log:

But the strings will still be passed to the command and this is the result:








https://github.com/MattiasC85/Send-CMMessage


And please think about security, escape characters etc, and try to use named arguments if you decide to use this method.


If you can trigger a script from a computer in WinPE and even before starting the TS, anyone can!


“-MP” needs to be set if running outside a TS or if the computer hasn’t got the Advanced client installed (Not tested)



If you just want to write something custom in the log then just leave the messageID alone and pass some insertionsstrings as arguments, the default prop-textfile will do the rest :)



2,242 views4 comments

4 Comments


gerald.doeserich
Apr 28, 2021

This doesn't seem to work for me in a HTTPS only environment.

I was able to figure out that we need to add a SSLCert (I added encryption just to be sure):

Lines 134 - 137 & 231 - 232. Now the authentication was working on the IIS but the server still rejected the message (from MP_Status.log):

Mp Status: processing event: MpEvent_ClientAuth_SignatureFailure, for machine: <SCCM Server Name here>


Interestingly it shows the SCCM server name and not the client name.


If I change the sender from Http.HttpSender to Ccm.CcmSender it works again without changes (Lines 183 & 184). But this then probably breaks functionallity in WinPE as CcmSender requires an installed client.


Do you know the solution to this problem?


Like

someguy100
someguy100
Mar 05, 2020

You just needed to import the additional dll that's included in the nuget package. :)


Like

someguy100
someguy100
Feb 06, 2020

Hi. Thanks for the comment and for letting me know that it doesn't work any longer. Been busy deploying 1909 without peer advantages and got a corrupt sccm upgrade on my hands but I'll look at it asap. Regards //Mattias

Like

daniel
Feb 05, 2020

Hi someguy100

I hope you are well. Hou have written a great blog about Create a custom status message. I have only a quick question. Is there a possibility to use the new Microsoft.ConfigurationManagement.Messaging.dll version (5.1902.1006.1000 - https://www.nuget.org/packages/Microsoft.ConfigurationManagement.Messaging/5.1902.1006.1000) ? Only the file replace doesn't work...

Best Regards,

Daniel

Like
bottom of page