POSH to import new machine objects for imaging along with OSD Variables
For the longest time, i couldn't find a good way to quickly and easily import a machine in CM12 for imaging along with necessary OSD variables to properly image our servers/workstations. Now that we have CM12 R2, a new cmdlet "New-CMDeviceVariable" is put to use! Here's a POSH i put together for importing new machine(s) in CM12 along with OSD variables. It reads the .CSV file you provide (will be prompted for the path and name for it) and import the machines that are in that file, line by line. This script also detects which domain you're in so you can set certain variables for let's say working you're in Lab or in your Production environment. Just crack this posh open and change necessary variables in there to match your settings. Below is the script, along with a sample .csv with required formats.
- Created on .