Archive for the ‘Microsoft SCCM 2012’ Category

During a task seuence in Microsoft SCCM 2012 R2, the operating system and applications are installed on the C: drive in most situations. But in some deployments, you definitely want to create more disks. For example, you want to create a D: and E: partition for storing some other data. Maybe for Microsoft SQL or Exchange installation, databases, logfiles or just some other data.

The following script will do all these steps for you during the task sequence. The script initialize, format, partition and label the disks for you….fully automated! 🙂

The script first checks how many disks are attached to the server.
If there is only one disk attached, you’ll have only a C: drive available after the deployment.
If there are 2 disks attached, you’ll have a C: and D: drive avalailable after the deployment.
If there are 3 disks attached, you’ll have a C:, D: and E: drive available after the deployment.

I quiet often receive the question how to enable Remote Desktop (RDP) access on a server during a task sequence in SCCM 2012 or 2012 R2. Because by default RDP is not enabled, it could be realy handy to enable RDP access to control your server remotely. There’re a whole bunch of tools to manage your server(s) remotely, but still RDP could be ncessary.

1.) Create a new package with the source location to your script directory.
2.) Create a new package with a program and use the following command:Powershell.exe -ExecutionPolicy Unrestricted -NoProfile -File Enable-RDP.ps13.) The PowerShell script ‘Enable-RDP.ps1’ contains the following code. See in this post below.
4.) Insert the script in your task sequence

This month I’ve to install and configure a Microsoft SCCM 2012 R2 environment. This customer is going to use SCCM basically deploying Windows Server 2012 R2 virtual machines. For the task sequences I’ve used the Windows Server 2012 Update 1 ISO, but there’re a few updates available in the past (around the 122 updates!!)

So I’ve configured a new Build and Capture task sequence to deploy a “Golden Image”. I’ve also integrated Windows Server Updates Services (WSUS) within SCCM, so during the Build and Capture task sequence the updates will also be installed. The task sequence takes a long time. After some troubleshooting, I’ve found some of the main reasons….Update KB3000850. This update is around the 700 MB and takes a long time to install!

Solution:First of all, I’ve updated the Windows Server 2012 R2 WIM from the ISO with the latest Windows updates using Offline Servicing. This great feture is available within SCCM 2012 R2. With Offline Servicing it is possible to apply Windows Updates in a WIM file offline. After applying update KB3000850 in the WIM image, the Build and Capture task sequences is going realy faster!! 🙂

This week I’ve upgraded a SCCM 2012 R2 environment to Service Pack 1 with update CU1. After the upgrade, I noticed that not all my task sequences (deployment) where available after PXE boot. Why is that? Is this a ‘new feature’ or just a ‘bug’? After some Troubleshooting I’ve figured out that there’s a strange thing in my deployments!

As you can see in my example I’ve created a collection with 3 deployments active. After PXE boot a virtual machine, only the first deployment is available?!?! :S The other two deployments are also active, but not available…

When we go to the properties of the other two deployments, and change the schedule 1 day back in the time, the deployment became available!! Very strange behavior, but this is the only ‘solution’ I’ve figured out!

During a deployment of Microsoft Windows 8/8.1, you’ll receive a question to select a prefered network connection. This is also happening during a task sequence within Microsoft SCCM 2012 R2. It’s easy to disable this
question during the task sequence, using an unattend XML file.

1.) First open the “Windows System Image Manager”, also known as WSIM
2.) Select the image you want to deploy. In my example “Install.WIM” from the Windows 8.1 source files
3.) Create a new catalog for this image
4.) After the catalog has succesfully created, create a “New Answer File”
5.) Navigate to the following selection
amd64_Microsoft-Windows-Shell-Setup_6.3.9600.17031_neutral
6.) Select the “+” on the left side and naviagte to “OOBE”
7.) Right-click on “OOBE” and select “Add Settings to Pass7oobeSystem
8.) Select in the right pane OOBE
9.) Select in the properties pane “HideWirelessSetupInOOBE” and set the value to “True”
10.) Save the XML file on your “source” directory on your primary site server
11.) Create a new package with the source directory to the directory you’ve created in the stap before
12.) Do NOT create any program in the package, so select “Do not create a program”
13.) Distribute the new package to your distribution point(s)
14.) Open your task sequence and navigate to stap “Apply Operating System”
15.) Select the option “Use an unattended or Sysprep answer file for a custom installation
16.) Select the package you’ve created before and type the name of your XML file within that package source location
17.) Boot a client from the network (PXE) and select the task sequence.

If you follow the steps within the task sequence, you’ll see that you didn’t receive a network connection screen anymore.

Today I had to move the library of the Distribution Point to another partition, because it was placed on the wrong partition during the install.

During the installation of ConfigMgr 2012 R2 (or ealier), you can place a file “no_sms_on_drive.sms” on the partitions that should be ignored for placing the library on.
In this environment there’s a C:, D: and E: drive. The C: partition is only used for the operating system. The D: drive is used for the installation of
ConfigMgr 2012 R2, SQL 2012 and the remote installation folder of WDS. The E: drive is used for the sources, images, ISO’s and the library of the Distribution Point.

So I want to move the library from the D: to the E: partition. First you’ve to download the “System Center 2012 R2 Configuration Manager Toolkit”. http://www.microsoft.com/en-us/download/details.aspx?id=36213

1.) Open REGEDIT and navigate to HKLM\SOFTWARE\Microsoft\SMS\DP and look for the registry key
“ContentLibraryPath” and “ContentLibUsableDrives”
2.) When you open Windows Explorer and browse to the D: drive, you’ll see the library foldersSCCMContentLibSMSPKGSMSPKGD$SMSPKGSIGSMSSIG$
These folders we want to move to the E: drive
3.) Open the command prompt and navigate to C:\Program Files (x86)\ConfigMgr 2012 Toolkit R2\ServerTools\”
4.) Use the following command to move the Library content from D: to E:ContentLibraryTransfer.exe -SourceDrive D -TargetDrive E > C:\TransferContentLibrary_log.txt
5.) Start CMTrace.exe and open the logfile “C:\TransferContentLibrary_log.txt” to watch the progress of the library move
6.) After a few hours, depending on the size of your library content, the move action is done
7.) pen REGEDIT and navigate to HKLM\SOFTWARE\Microsoft\SMS\DP and look for the registry key
“ContentLibraryPath” and “ContentLibUsableDrives”
Now you’ll see only the E: drive for the Library placement
8.) I’ve have created the file “no_sms_on_drive.sms” on the C: and D: drive

When you have a Microsoft ConfigMgr 2012 or 2012 R2 environment, you definitely have a lot of packages and applications. This could be: tools, scripts, client packages, boot images, ISO’s, WIM files, different software applications, etc. When you have no idea where all these source files are located, you can execute a query within your SQL environment.

You can generate an overview of all your packages, with the package ID, description, name, source location, version, etc. Very helpfull and it saves you alot of time!!

1.) Open the Microsoft SQL Server Managent Studio
2.) Login with a user that has enough rights to execute queries
3.) Select the ConfigMgr database (in my example CM_PS1)
4.) Select “New Query”
5.) Type “SELECT * from v_Package”
6.) Select “Execute” or press F5 on your keyboard
7.) Now you’ll see a list off all the packages within your ConfigMgr 2012 environment
8.) Navigate to the table “PkgSourcePath”
9.) Here are your source files locates of all the different packages

During a OS deployment you don’t want to deploy all your packages and software to every workstation. You can deploy the software after a full OS deployment, but you can also deploy packages during the OSD using collection variables. Now it is possible to deploy packages only if a specific machine is a member of a collection. This collection can be query based, for example OU membership or Active Directory security group, or it can be static (direct membership).

In this example I’ve created a realy simple deployment, Adobe Reader 11.0. I’ve two virtual machines, SCWIN81-01 and SCWIN81-02. Both machines are members of the collection “Deploy – Windows 8.1 Enterprise x64”, where the task sequence is deployed on. Machine SCWIN81-01 is also member of the collection “Install – Adobe Reader 11.0”. This collection has a limited collection of “Deploy – Windows 8.1 Enterprise x64”. Both machines are deployed on the same time, the only difference is that machine SCWIN81-01 has Adobe Reader 11.0 installed and machine SCWIN81-02 not. Why……based on the collection variable during the OSD 🙂

1.) First create the collections
2.) Make the specific machines members of the right collections (query based or direct membership)
3.) Open the properties of the collection “Install – Adobe Reader 11.0” and navigate to the “Collection Variables” tab
4.) Add one or more variables with some values. In this example the variable is “APP-AdobeReader” with the value “Yes”5.) Open the task sequence and add a package installation step
6.) Add the package with the program and navigate to the “Options” tab
7.) Select “Add Condition” and select “Task Sequence Variable”
8.) Enter the collection variable you’ve created earlier with the same value. In my example:Task Sequences Variable APP-AdobeReader equals “Yes”
9.) Select “Apply” and close the task sequence.
10.) Start the OSD on both machines and wait until the installation is done!
11.) Watch the differences between both machines, if everything is okay, one machine has Adobe Reader installed and the other not.

This is an extremely powerfull thing within ConfigMgr, and really helpfull is some scenario’s. For example VDI golden image deployments or hybrid environments with laptops/desktops or multiple organizations using one ConfigMgr environment. One main reason could be consolidation in task sequences. If you want, there should be only one task sequence for all you different deployments. This is why I’m loving collection varaibles! 🙂