From now on you can also see all my posts on: dynamicdatacenter.wordpress.com

Hope to see you guys there.



Categories: SCCM

Configuration Manager 2012: Build & Capture Windows 8 RC

While I tried a build & capture of Windows 8 RC using CM12 I received an error 0x00004004 when performing the sysprep command before the image could be captured.

After some searching I found out that this is a known issue because of the fact that Windows 8 is not (yet) officially supported by CM12.

But for the people who still want to capture an image of a Windows 8 machine you can do the following:

– Sysprep the machine manually (sysprep.exe is located under: C:\Windows\System32\sysprep). Choose Enter OOBE, select Generalize and make sure the system reboots after completion of sysprep.

– Boot the machine you’ve just sysprepped into WinPE (with command prompt support, you can use the CM12 boot image for that if you’ve already customized it to support command prompt (F8))

– Press F8 to start a command prompt

– Connect to a networkshare where the imagex.exe application is located

– Run the following command: imagex.exe /capture [UNC path to the location you want to store the WIM file] [Description between “] eg. imagex.exe /capture \\sc12cmsrv12\wim$\Win8_CP_x86.wim “Windows 8 Consumer Preview x86”

Afterwards the created WIM image can be imported in CM12.



Configuration Manager 2012: Enable Remote Assistance

I had some issues configuring the Remote assistance feature included in the Remote Tools of Configuration Manager 2012. This is a short guide on what to keep in mind to be able to use Remote Assistance.

The difference between Remote Control and Remote Assistance is listed below:

Remote Control is a feature of Configuration Manager 2012. Lots of settings can be configured using a client settings policy. A machine can also be remote controlled without the need of a user being logged on at that time. It is possible to disable the prompt that the user has to confirm that the administrator is connecting to the machine. The consequence of this is that an administrator can view a user on a certain machine without the user noticing that (Privacy?).

Remote Assistance is a Windows feature. The default behavior that the user has to accept the request of the administrator cannot be changed and a machine cannot be remote controlled when no one is logged on.

First of all the Remote Assistance feature must be installed on the CM12 site server. This can be done (obviously) by using ‘Add Roles & Features’.

Now try to connect to a computer by right clicking it in the CM12 console –> Start –> Remote Assistance.

An error is shown.

This is due to the lack of permissions the user running the console has on the computer you want to connect to using Remote Assistance. The easiest way to give the necessary permissions to the user is by creating a Group Policy Object where the following settings are configured:

In the group policy management console go to: Computer Configuration –> Policies –> Administrative Templates –> System –> Remote assistance

In the Offer remote assistance setting, click Enabled and click Show.

Now you can enter users or groups which need the Remote Assistance permissions (format: [domain]\UserName or [domain]\GroupName).

Wait until the group policy is applied (or use gpupdate /force).

In the CM12 Console right click the computer (after the policy is applied), Start –> Remote Assistance.

The error should be gone and the following window should appear:

On the client (CL2W8) a prompt appears to notify the user that an administrator wants to connect to his computer.

A Remote Assistance session is now started. A chat window can also be launched for interaction between administrator and user. Every Remote assistance session generates an XML file under the following path (Windows 7 / Windows Server 2008 R2):

– CM12 Site server: [System Drive]\Users\[UserName]\Documents\Remote Application Logs with username the name of the user running the CM12 console.

– Remote Assistance ‘Client’: [System Drive]\Users\[UserName]\Documents\Remote Application Logs with username the name of the user accepting the Remote Assistance.



Configuration Manager 2012: Create Office 2010 Application

When using the new application model provided in CM12 you might have noticed that the default supported formats are msi and App-V. This means that when you create an application based on a msi installer, all information is already filled in for you
But what happens when you have a exe-application? Creation of a CM application based on a .exe installer (or any other format which is not msi or App-V) requires some manual steps. This post provides one way of creating an application for Office 2010 Professional (which is a setup.exe based application)

Open the CM12 console, go to Software Library, Application Management, Applications.

Right click applications ->; Create Application. This will launch the create application wizard

At the first page you should select Manaully specify the application information, this option must be selected for any installer that is not based on msi or App-V.

On the next screen provide information such as: Name, Manufacturer, Software Version,.. Make sure you also select the checkbox “Allow the application to be installed from the install application task sequence action instead of deploying it manually”. This is needed when you want to have the application installed during an OSD task sequence. Also specify the application owner. Click Next when finished

Edit information on the next page if needed, else click Next

At the deployment types wizard page click Add. Select “Manually speficy the deployment type information”. Click Next when finished

Fill in the name of the deployment type. Eg.: Install Microsoft Office 2010 MUI. Click Next

Browse to the location of the source files of the application (use UNC-path!!). Fill in the installation program (in this case: setup.exe), an MST file can also be provided in the command line. In this case it’s not needed because I’ve put the mst-file in the Updates folder. Setup.exe will automatically detect the mst file there and use it while installing. Provide the uninstall program if needed (here: setup.exe /uninstall PROPLUS). When everything is OK click Next.

On the detection method wizard page click add clause. In the detection rule window information should be provided to make sure CM12 can detect if the application is already present on the system. This can be very a variety of information (registry key, file, GUID,…). In this case I provided the GUID usind by the Office 2012 ProPlus msi file: {90140000-002A-0000-1000-0000000FF1CE} . I’ve left the selection at the bottom default (“The MSI product code must exist on the target system to indicate presence of this application”). Click Next

Click Next on the detection method wizard page

Select Install for system and Whether or not a user is logged on. Change this setting if needed. In this case I’ve left the defaults. Click Next

On the next page, add requirements if needed (in this case I’ve added nothing). Click Next when finished

Dependencies can be added on the next page. Dependencies are software packages that the package you are creating at the moment relies on. Office 2010 doesn’t have dependencies so none should be selected. Click Next

Review the summary and click Next

On the Create Deployment Type completion page click Close

Add extra deployment types when needed. Click Next when finished

Review the Application summary, Click Next

Review the create application completion and click Close

Office 2012 is now available in CM12. By creating an application in stead of a package all advantages of an application can be used (detection methods, supersedence, dependencies,…).

In one of the next posts I’ll create another application (the CM12 console with a .NET Framework Dependency.



Powershell: Create Packages ConfigMgr 2012

As you guys probably have noticed: Microsoft released a new version of Configuration Manager: System Center 2012 Configuration Manager.

I’m already working on a new version of the software import script. The script will create a package with some deployment types associated to it. I’m still improving the script to create applications in stead of packages because I also want to use the whole new application model provided within CM12. This model provides extra flexibility to the deployment of applications:

– Adding dependency features

– Adding supersedence features

– Adding a better way of detection to check if the application is already present on the system.

An overview of the script is provided in this post. As an example I’ll create a package containing the application 7zip.

Like the scripts I’ve created earlier, the script should be run on the Primary CM12 server. Right click the script ->; Run with powershell. The GUI should launch.

Enter the link to the source folder into the uppermost textbox, this can be a local path because the script will replace the local drive with a UNC path. (ex: D:\DSL\7zip\7zip\9.2\EN\MSI)

Typ the install and/or uninstall comandline that should be made available in CM12.


– Install: MSIEXEC /I 7z920-x64.msi /QB!- REBOOT=R ALLUSERS=1 /L*v c:\windows\temp\INSTALL_7zip.log

– Uninstall: MSIEXEC /X 7z920-x64.msi /QB!- REBOOT=R ALLUSERS=1 /L*v c:\windows\temp\REMOVE_7zip.log

If you want to create a (device) collection associated to these commandlines, check the checkbox provided. If no collections are needed, obviously the checkbox doesn’t have to be checked :-).

When everything is provided as it should be click Create. Logging should appear in the underlying Powershell console window.

Review all steps and make sure there are no errors listed.

While executing the script, some objects are created in the CM12 console, this can be reviewed immediately. Open the CM12 console and go to the Software Library tab, Application Management and click Packages. The package should be listed here. You can see there are 2 programs associated with it.

To see the programs associated with the package, just click the package. At the bottom of the screen click the programs tab, the 2 programs should show here.

When the ‘Create Collection(s)” checkbox was checked previously, you can review the creation of the collections under the Assets & Compliance tab, Device Collections.

I’m still working on the automated creation of the deployments but that’s still Work In Progress. Also the automated creation of applications (in stead of packages) is something I’ll be working on in the next few weeks/months. But I’ll keep you updated by posting any additional progress.



Powershell: Remove obsolete records

07/11/2011 1 comment

This is the way computer records are handled within SCCM:

Deployment type

Bare-metal PXE boot

Refresh PXE boot

Refresh Advertisement

Record obsolete


Record Merged




Newly imported record is merged with SCCM record

So any added variables to manual import will still exist

Old record becomes obsolete

Old record and new record are merged. Any variables stay.

I don’t doubt about the fact that sometimes there is a need to delete an obsolete record. Why not delete all obsolete records at once?
This post will describe a Powershell code example that can be used to delete all existing obsolete computer records within SCCM.
All code should be run on the SCCM primary site server.
The following actions are needed to perform a successfull delete:
  • Retrieve the sitecode from the SCCM site
  • List all obsolete computer records
  • Delete all obsolete computer records
Retrieve Sitecode:
$comp = hostname
$wmi = get-WMIObject -ComputerName $pc -Namespace "root\SMS" -Class "SMS_ProviderLocation"
$wmi | foreach-object{if ($_.ProviderForLocalSite -eq $true){$SiteCode=$_.sitecode}}
After execution of these 3 lines of code the variable $SiteCode contains the sitecode of the SCCM Site.
This code will be used in the queries needed in the following steps.
Find + Delete all obsolete computer records:
$CollID = "SMS00001" #This is the collection ID of the All Systems collection, this value is the same for every SCCM infrastructure
$pc = hostname
$wmi = Get-WmiObject -computername $pc -Namespace "root\sms\Site_$SiteCode" -query "select * from SMS_FullCollectionMembership WHERE CollectionID=`'$CollID`'"
foreach ($w in $wmi)
if($w.IsObsolete -like "*True*"){
$resID = Get-WmiObject -computername $pc -Namespace "root\sms\site_$SiteCode" -query "select resourceID from sms_r_system where name like '$($w.name)'"
$comp = [wmi]"\\.\root\sms\site_$($SiteCode):sms_r_system.resourceID=$($resID.ResourceId)"
What this code does is pretty simple:
  • Find all computer records in the All Systems collection of SCCM.
  • Querying every record to see if the property “IsObsolete” equals True
  • If the “IsObsolete” property is true the record will be deleted.
Hope this will help when there is a need for deleting obsolete records.

Configuration Manager 2007: Use collection variables to select default OS Language (OSD)

As shown in one of my previous posts it’s possible to add multiple language packs to an OS image in the build & capture sequence. But how can you select which language needs to be selected as default language while deploying a new computer. I do this by making multiple unattend.xml files and by using collection variables.

In my example I have an OS that can be installed with 3 default languages:

  • English
  • Dutch
  • French
So I’ve made 3 identical unattend.xml files, the only thing that is different is the Microsoft-Windows-International-Core component:
  • English: Inputlocale: 0409:0000813, Systemlocale= en-US, UILanguage= en-US, Userlocale=nl-BE
  • Dutch: Inputlocale: 0813:0000813, Systemlocale= nl-BE, UILanguage= nl-nl, Userlocale=nl-BE
  • French: Inputlocale: 080C:000080C, Systemlocale= fr-BE, UILanguage= fr-fr, Userlocale=fr-BE
All the other settings are the same for all 3 unattend.xml files. They should also have a unique name (obviously): unattend_OSD_EN.xml, unattend_OSD_NL.xml and unattend_OSD_FR.xml.
These unattend.xml files should also be included in a software package so they can be used during the task sequence.
The next thing I did was creating 1 collection with multiple subcollections.
This is the easiest way of doing because you can then advertise the task sequence to the root collection and make sure the “include members of subcollections” is checked. The task sequence then only has to be advertised on 1 collection but computers in the subcollections also receive the task sequence advertisement.
The next thing I did was adding a collection variable to every subcollection of the Bare Metal collection. I named the variable “OSLanguage”. A variable can be edited by right-clicking the desired collection and then selecting “Modify collection settings”. Then move to the collection variables tab. A new collection variable can be added here. This is the example for the Bare Metal – EN collection.
For the collections “Bare Metal – NL” the value of the variable is “NL”. For “Bare Metal – FR” it’s “FR”.
The final step is adding multiple “Apply Operating System images” steps to the deployment task sequence which queries for a task sequence variable of the computer that is deployed.
Add the steps like shown in the following screenshot, they can be offcourse renamed at will.
As an example I will show the properties of the “Apply Operating System – EN” step.
  • Select the package that contains the unattend.xml files and make sure the right file will be selected to install English as the default language.
  • Now go to the options tab, Click Add Condition and select ” Task Sequence variable”. Fill in the Variable (“OSLanguage”) and the value (“EN”) and click OK. The options tab should look like this:
How the same can be done for the Dutch and French steps. The only thing you have to keep in mind is that the name of the variable and the value you query for must be the same as the ones specified at collection level.
The task sequence can now be advertised to the “Bare Metal” collection.
Computers that are a member of a subcollection will receive their OS with the right language set as default language. (Only prerequisite is that the language pack is already available in the WIM image that will be used for installing the computer)
If you’re still wondering how to add a language pack to an OS image you can take a look at one of my previous posts for a way of doing so.
%d bloggers like this: