Deployment, SCCM2012, SCCM2012RTM, SUP

Clean Superseeded and expired Software Updates with PowerShell ( SUP )

If you want more information WHY to clean expired and superseded updates you can get more information here from Kent Agerlund.
http://blog.coretech.dk/kea/house-of-cardsthe-configmgr-software-update-point-and-wsus/

Also thank Nickolaj Andersen who made the script that does all the work!
http://www.scconfigmgr.com/2014/11/18/remove-expired-and-superseded-updates-from-a-software-update-group-with-powershell/

Download the file here.
https://onedrive.live.com/redir?resid=D46D4A6EBDD0F10D%211617

First step is to download the files and copy them to a folder of your choice. In the example, I am using C:\Temp
1

Open the file getAllSoftWareUpdates.ps1 with Powershell ISE as an administrator.
2

When the file is open you have to change three values , the first value we have to change is the SiteCode , so change the marked SiteCode S01 ( se the picture ) to the SiteCode you are using where you want to clean updates.
The second value we have to change is the “Client” value, this value represents the name of the software update group or groups that you want to clean, for example. If you have 10 “Client” groups and you want to clean all of those, you enter “Client” and if you have five different “Server” groups you change the value to “Servers”. This script will always take every group with the name you enter in the script.
3

4

The third and last value we are going to change is the “SiteServer” name ( se picture ) this can be any server with a provider installed ( I usually run this script on the primary site server then you know it will work , if you are not sure how many providers you have on your site ). After you have change the value go ahead and try to run the script.

5

If everything works it should look something like this  really nice that you can follow the progress in the console.
6

Deployment, MDT, SCCM2012, SCCM2012RTM

Deployment Tip! Reduce Toolkit Timeout

Hi everyone! I thought i should share this tip if you want to be able to speed up deployment a bit if you are using MDT or MDT integrated Task Sequence in Configuration Manager. The default Tookit timeout is set to 30 seconds and if you have a couple of “Use Toolkit Package” steps in you´r Sequence you add a couple of extra minutes to the deployment time. So this tip is useful to reduce the time it takes for actually deployment! I especially use this for LAB setups, the less you have to wait for stuff the better right?!
First, how to change the timeout on the MDT Deploymentshare
Step number one, navigate to the location of your MDT Toolkit folder located where you created the Deployment share, in my case it looks like this.
1

Navigate to the “Scripts” folder and locate the file ZTISCCM.wsf , open it with a tex editing tool of you´r choice like this.
Next step , changing the same setting on the MDT Toolkit package in CM.
2
When the document is open , search for 30000 , the results should look like screenshot below! This is the default “sleep” or waittime for the script before it runs all the Toolkit package scripts. Go ahead and change the value from 30000 to 5000 ( 5 seconds ).
3
4
close the document and test if you notice any difference!

Changing the Toolkit Timeout for SCCM.

To change this setting on SCCM open the SCCM console and locate the sourcefiles for you´r MDT Toolkit used in the Task Sequence.
click properties and then check the “data source” location.
5
Browse the location and open the scripts file, repeat the intructions above , DO NOT FORGET TO UPDATE THE DISTRIBUTION POINT afterwards.
6

Happy Deployment!

Deployment, MDT, SCCM2012RTM, UEFI

Hello!
I stumbled upon this problem when i was at a customer this week creating a Windows 8.1 image and was going to make the Microsoft Surface 2 Pro certified for deploying via CM2012R2.
As everyone knows the Surface 2 Pro uses UEFI and has no bios, and I constantly ran into different problems when trying to apply the operating system to the UEFI formated disk.
The error I got was the following (one of them after trying different fixes). ( the interesting part is highlighted with bold)

The task sequence execution engine failed executing the action (Apply Windows 8.1 Enterprise X64) in the group (Install) with the error code 2147942487
Action output: Command line for extension .exe is ”%1” %*
Set command line: ”OSDApplyOS.exe” /image:S02001F0,1 ”/config:S02001F6,Unattend.xml” /target:%OSDisk% /runfromnet:False
((g_Target.Disk > 0) || (arg == L”0″)) && (g_Target.Partition >= c_MinPartition), HRESULT=80070057 (e:\nts_sccm_release\sms\client\osdeployment\applyos\applyos.cpp,254)
ParseCommandLine(), HRESULT=80070057 (e:\nts_sccm_release\sms\client\osdeployment\applyos\applyos.cpp,429)
The /target parameter specifies an invalid target location.. The operating system reported error 2147942487: The parameter is incorrect.

So if we take a look at the default MDT Task Sequence in ConfigMGR ( note, that this problem only occurs on SCCM 2012 RTM , AND if you upgrade from RTM to a newer version)
The default looks like this, and this will break the first step in the UEFI deployment.
What we need to do there is to remove everything EXEPT the last step. ON BOTH STEPS that are enclosed with red.

When those are removed double click the OSdisk step and change the following. Change it to OSDISK, and as you probably figured out by now… THIS is what breaks it, the value here is not OSDisk but OSDTemporaryDrive…


The next step is to change the second part of the UEFI disk format step under the “Format disk” step. Make sure the “MAKE THIS THE BOOT DISK” is checked, this is NOT checked on RTM and will break the “apply OS” step later in the TS.

Also make sure the OSDisk Primary also uses the variable OSDisk!
Next step we need to change is the “Preserve driver letter” step in the sequence so that the image applies to the driver letter we actually created the reference image from. THIS CAN BREAK the TS if you are running Windows 7 deployment and uses the original .WIM from the source media ( NEVER DO THIS always create a reference image). Change the value from FALSE to TRUE.
The next step is to change the “apply operating system” and change the destination to logical driver letter stored in a variable to OSDisk.