Working with a customer recently we wanted to deploy a ConfigMgr Application to all all laptops in the organization without creating a new collection of just laptops. Using the
ChassisTypes property of the
Win32_SystemEnclosure WMI namespace is a great way to do this; however, it can get a bit complicated, especially when there is non-normalized data in the inventory. An example would be a wrongly coded
Additionally, if you want to target only desktops and exclude virtual computers the details can get tricky if you have a diverse environment.
Jason Sandy’s has a great blog explaining ConfigMgr Package/Program retry behavior including the Retry return/exit/error codes and how often the retry occurs. One bit of info missing from the blog that I couldn’t find anywhere else (documentation, forums, blogs, etc.) was how long or how many retry attempts will occur before ConfigMgr gives up.
The answer is… 1008 times! This equates to every 10 minutes for an entire week; however, if the computer is restarted, turned off, goes to sleep, etc. the duration will be extended.
To verify this I created a Package/Program that simply exits with an error code in the FailureRetry list. Something like
The environment variable PATH (combined SYSTEM PATH and USER PATH) can be tricky to parse if you want to check for each folder it contains. This is due to the support of various formatting styles. For example, this is a valid PATH statement:
C:\WINDOWS\;"C:\Path with semicolon; in the middle";"E:\Path with semicolon at the end;";;C:\ProgramFiles;