ConfigMgr Chassis Type Global Condition / Requirement

wp-read-more-redirectwp-read-more-redirectNo Gravatar

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 ChassisType .

Additionally, if you want to target only desktops and exclude virtual computers the details can get tricky if you have a diverse environment.

continue reading on CatapultSystems.com

February 16, 2018

Posted In: ConfigMgr

ConfigMgr Package/Program… will retry later

wp-read-more-redirectwp-read-more-redirectNo Gravatar

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

image

continue reading on CatapultSystems.com

February 1, 2018

Posted In: ConfigMgr, ConfigMgr 2007

Tags: ,

Parse env:Path with PowerShell

wp-read-more-redirectwp-read-more-redirectNo Gravatar

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:

Notice the differences

  • Folder with spaces
  • Folder without spaces
  • Folder with an ending backslash (\)
  • Folder without an ending backslash (\)
  • Folder with a semicolon in the middle
  • Folder with a semicolon at the end
  • Blank folder (;;)

A few references can be found…

But, I could find no simple method to parse this complexity so I wrote a PowerShell Function to handle it.

continue reading on CatapultSystems.com

January 30, 2018

Posted In: Scripting

Tags: ,

GitHub embedding

wp-read-more-redirectwp-read-more-redirectNo Gravatar

This is an example of embedding a GitHub repository script in WordPress using the WP-GitHub plugin (with customized prism.js to add PowerShell, Batch, SQL and AutoIt language support)

And an example of a custom plugin (not yet published) with shortcode: Read More Redirect
continue reading on CatapultSystems.com

January 5, 2017

Posted In: Scripting

Tags: ,