Troubleshooting Windows Update Agent

A short guide for troubleshooting Windows Update Agent:

1. Download and execute//install “System Update Readiness Tool (CheckSur)” from
Check the following log for errors C:WindowsLogsCBSCheckSUR.log
2. For any updates that could not be repaired by CheckSur, download the msu-package manually from Microsoft Catalog, or from Microsoft Download Center,
3. Create the folder C:WindowsCheckSurpackages if it doesnt already exists and move the downloaded updates there.
4. Execute “System Update Readiness Tool (CheckSur)” again.
5. Install updates from Windows Update.

Remove the BDEDrive partition

MDT creates a partition named BDEDrive when it installs Windows OS. This drive is used with Bitlocker to boot the OS. If Bitlocker never will be used the BDEDrive can be removed using the following procedure:

1. Start an elevated command promt and execute the following command to copy startup files to the C-drive:
bcdboot C:Windows /s C:
2. Set partition C: as active:
list disk
select disk 0
list part
select part 1
active part
3. Reboot the computer:
shutdown -r -t 0
4. Delete the BCD Drive:
list disk
select disk 0
list part
select part 2
delete part

There is a more indepth explanation at the following site:

Features On Demand

How To Patch Windows Image to be able to install Features On Demand on patched Windows Server 2012:
0. Show applied patches:
1. Download patches using “WSUS Offline Update”
2. Mount the wim-file using dism:
dism /mount-wim /WimFile:C:wsusofflinewiminstall.wim /index:2 /mountDir:C:wsusofflinedismmount
3. Apply patches
dism “/Image:c:wsusofflinedismmount” /Add-Package “/PackagePath:C:wsusofflineclientw62-x64temp”
4. Commit changes
dism /Unmount-Wim /MountDir:c:wsusofflinedismmount /commit
5. Repeat step 2-4 for the other images (index 1,3,4)


To list packages added to the image:
dism /Image:C:wsusofflinedismmount /Get-Packages

For troubleshooting installations:

PowerShell Remoting

First of all Powershell Remoting must be enabled on the machine you are going to manage. The command ‘Enable-PSRemoting -Force’ starts the WinRM service, changes its startup mode to automatic and creates a firewall-rule that allows incoming connections.

You can test the connection by entering the following Powershell command from an remote computer:

The result should look something like in the following example:
PS C:UsersTestUser> Test-WsMan TESTCOMPUTER

wsmid :
ProtocolVersion :
ProductVendor : Microsoft Corporation
ProductVersion : OS: 0.0.0 SP: 0.0 Stack: 3.0

To create a remote session, enter the following command:
Enter-PSSession -Computername -Credential <domainusername>


Initialize, partition and format disks using PowerShell

I ran into this good blogpost about using PowerShell to Initialize Raw Disks, and to Partition and Format Volumes.

To summarize, you can initialize raw disks and partition and format volumes using the following simple PowerShell “script”:
Get-Disk | Where partitionstyle -eq ‘raw’ | Initialize-Disk -PartitionStyle MBR -PassThru | New-Partition -AssignDriveLetter -UseMaximumSize | Format-Volume -FileSystem NTFS -NewFileSystemLabel “disk2” -Confirm:$false

Create your website with
Get started