This script was donated by a customer of ours. They have sent us a sanitized version of the script to share.
Please use this at your own risk, and fully understand what it is doing before using it!
SCCM Installation fires off in the background and you have no idea whether it worked or not. Also, if any other installs try to start while the SCCM setup is running, you will get an error.
Run the SCCM Installation as a powershell script that watches the log file for the completion status.
This allows puppet to install SCCM Client as a "package" (not an exec), which uses built in providers to determine if it is installed, at the right version, or not.
Also, this "holds" the puppet agent's attention while the installation is in progress, so that it doesn't try to run another install.
~tommy