SCCM 2012 Create Media – createmedia.exe Command line usage

We needed to create a Full Media, for an USB installation. So as you can imagine, the size of a Standalone Media exceeds normal limits. In this case, the media file, that should be created, was 11 GB. In Sytem Center Configuration Manager 2007, it worked like a charm with the wizard, to create a Standalone Media directly on a USB stick, and so should it works on 2012 too. Unfortunately there is actually a bug when you work with the wizard, if the Media exceed 4095 MB, this can you see in the log CreateTsMedia.log, which resides in the directory “AdminUILog” below the installation location of the SCCM Console. So the workaround is, that you create a ISO-File on the commandline with createmedia.exe. At the end of this post you can find the command line parameters, those are reported to the CreateTsMedia.log, when you call createmedia.exe without any paramters.

In my environment I used the following command:
CreateMedia.exe /K:full /P:”SCCMMP.domain.TLD” /D:”SCCMDP.domain.TLD” /S:”H05″ /L:”FullMediaLabel”
/A:”H0500009″ /Z:”False” /T:”CD” /M:”44482″ /F:”D:FullMedia.iso” /X:”OSDComputerName=” /X:”OSType=Enterprise”

/K:<MediaType> /P:<SMSProvider> /D:<list of DP server names> /S:<Site Code> /A:<TaskSequenceID> /X:<Variables>

A good technet forum article pointed me in the right direction, but the I needed to implement more than one Variable, and also one, which will be filled before staging starts. There I was spend some time, and as you can see in my example above, you can simply add the switch /X multiple times. The Task Sequence Variable OSType is set to Enterprise, and the variable OSDComputerName is to set at the start of the Task Sequence:

If the creation of the iso file was successfull, refer to the logfile because there are no messages in the commandline or elsewhere, you can prepare your USB stick for booting. Use diskpart, delete all existing partitions, create an active partition and format it as a normal FAT32 partition. After that, open the created iso file, I used 7-zip, and copy the hole content to the USB stick. Plug your stick in, and happy booting 🙂

Hope this helps, and here is the full list of createmedia.exe:

USAGE:
bootmedia:
CreateMedia.exe
/K:boot
/P:<provider>
/S:<sitecode>
/C:<connectionoptions>
/D:<listofDPservernames>
/L:<medialabel>
/E:<pre-executionpackageid>
/G:<pre-executioncommandline>
/Y:<passwordtoencryptcertificate>
/R:<certificatefilepath>
/W:<certificatefilepassword>
/U:<unknownmachinesupport>
/J:<internetclient>
/Z:<unattendedmedia>
/1:<[certificatestarttime]HIGH;LOW>
/2:<[certificateexpirationtime]HIGH;LOW>
/5:<udasetting>
/X:<TaskSequenceVariable>
/B:<bootimageid>
/T:<mediatype>
/F:<destinationofmediafile>

capturemedia:
CreateMedia.exe
/K:capture
/P:<provider>
/S:<sitecode>
/C:<connectionoptions>
/D:<listofDPservernames>
/L:<medialabel>
/B:<bootimageid>
/T:<mediatype>
/F:<destinationofmediafile>

stand-alonemedia:
CreateMedia.exe
/K:full
/P:<provider>
/S:<sitecode>
/C:<connectionoptions>
/D:<listofDPservernames>
/L:<medialabel>
/E:<pre-executionpackageid>
/G:<pre-executioncommandline>
/Y:<passwordtoencryptcertificate>
/A:<tasksequenceid>
/Z:<unattendedmedia>
/X:<TaskSequenceVariable>
/T:<mediatype>
/M:<mediasize>
/F:<destinationofmediafile>

prestagedmedia:
CreateMedia.exe
/K:prestaged
/P:<provider>
/S:<sitecode>
/C:<connectionoptions>
/D:<listofDPservernames>
/L:<imagecreatedby>
/3:<imageversion>
/4:<imagedescription>
/E:<pre-executionpackageid>
/G:<pre-executioncommandline>
/Y:<passwordtoencryptcertificate>
/R:<certificatefilepath>
/W:<certificatefilepassword>
/U:<unknownmachinesupport>
/Z:<unattendedmedia>
/1:<[certificatestarttime]HIGH;LOW>
/2:<[certificateexpirationtime]HIGH;LOW>
/5:<udasetting>
/X:<TaskSequenceVariable>
/B:<bootimageid>
/O:<OSimageid>
/I:<OSimageindex>
/T:<mediatype>
/F:<destinationofmediafile>

3 thoughts on “SCCM 2012 Create Media – createmedia.exe Command line usage

  1. Hey There, Great posts. I am attempting to get around the 4096 nonsense and am looking for the detailed explanation for the commandline switch values for CreateMedia.exe. /T and particularly the possible value /M help is not available for them and /? doesn’t respond…
    Thanks in advance…

    • hey, sorry for relay. Unfortunately, all Information given with /? is reported to the CreateTsMedia.log. Until now, i can’t find more Information about this topic.

  2. Beating the 32 GB limit on a USB stick and the 4096 nonsense is actually quite simple. Create your stand alone media task sequence but when doing so, select CD/DVD set. Change the drop down to unlimited and choose a path to a media file. This will create an ISO of the task sequence. Use 7Zip to extract the ISO to a formatted NTFS 64 GB USB stick. Works perfectly.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s