Following Brandon Linton's post about creating and importing a WinPE 3.1 boot image for use in ConfigMgr 2012 SP1 CU2, below is a little Powershell script to enable command-shell
#CM2012
R2 - Enable Command-Shell in WinPE 3.1 Boot Image
#Replace below OSDxxxxx with your boot image package ID
$BootImagePackageID = "OSDxxxxx"
#Get the
Boot image - Replace OSD by your site code
$BootImageQuery = Get-WmiObject
-Namespace "Root\SMS\Site_OSD" -Class SMS_BootImagePackage -Filter "PackageID='$BootImagePackageID'"
#Read
Properties
$BootImageQuery.Get()
#Enable
Command-Shell
$BootImageQuery.EnableLabShell = 'True'
$BootImageQuery.Put()
#Update
Distribution Points
$BootImageQuery.RefreshPkgSource()
very helpful, many thanks (need pe3.1 boot images for vmware 4.x...)
ReplyDeleteGlad this PS helped you !
ReplyDeleteI am having some difficulties executing this, can you confirm the process in which to carry this out. Many thanks in advance.
ReplyDelete@Lee Martin - Did you follow Brandon Linton's blog post to first import a winpe 3.1 image ?
ReplyDeletehttp://blogs.technet.com/b/brandonlinton/archive/2013/06/21/how-to-create-and-import-a-winpe-3-1-boot-image-for-use-in-configmgr-2012-sp1-cu2.aspx
If yes, at which point do you have difficulties ?
Thanks for coming back to me. Yes I have a Win pe 3.1 boot image from my 07 env I have imported in and would like to use this to add in the command support. Question was more aroudn where to execute script. Site Server or technician machine with boot image on? I tried to run it in its current form with my package ID but got some errors. I am trying this on R2, i know its not for that directly but was hoping it may work.
ReplyDeleteThanks in advance.
Issue now resolved. Thanks
ReplyDeleteGreat !
ReplyDelete