Lock screen image not showing – Windows 10 1703

Recently I was trying to apply a lock screen image with a GPO. I distributed the image to the C:/Windows/Web/Wallpaper directory and configured the Windows 10 GPO to that location. After running the Windows 10 Task Sequence successfully, the default lock screen image came up. I was using a large image from the client so that it still looks good on bigger screens. I’ve found out that after resizing the image back to 1080P, the image was applied successfully after locking the machine. Looks like a strange bug if you would ask me.

Cheers!

Enable Hyper-V during Task Sequence in SCCM 2012 R2

Because I wanted to configure Device Guard with Windows 10, I need the Hyper-V Hypervisor to be enabled on Windows 10. I tried to do this with DISM and an answer file, but it’s not possible to enable Hyper-V during the Task Sequence Deployment because Hyper-V requires a couple of reboots.

Solution:

Create a new “Set Task Sequence Variable” task in your Task Sequence. This will run the PowerShell command after the Task Sequence ends. I’ve set this task before enabling the Driver Package, but it should be possible to place this task anywhere you like.

Task Sequence Variable: SMSTSPostAction

Value: powershell -ExecutionPolicy ByPass -Command “Enable-WindowsOptionalFeature -Online -FeatureName Microsoft-Hyper-V-Hypervisor -all -NoRestart;Disable-WindowsOptionalFeature -Online -FeatureName Microsoft-Hyper-V-Tools-All,Microsoft-Hyper-V-Services -NoRestart”

This will do the following:

  1. Enable all the Hyper-V Features after the deployment
  2. Remove the Hyper-V Tools and Services (Management Tools) afterwards. I found out that this is the best way to only add the Hyper-V Hypervisor.

You still need to reboot the system a few times to enable this feature. Because I enabled the BitLocker PIN, I can’t reboot the machine because it will ask for a PIN a few times.

Screenshot:

Enable-HyperV

Script for package failed with exit code 4 in SCCM 2012 R2

Problem:

In SCCM 2012 R2 SP1 CU2, I’ve created a package that deploys some files such as wallpapers with a .BAT file. When I check the execmgr.log, I see the following error:

Script for Package:PR######, Program: Run Script failed with exit code 4.

Solution:

Under the program in SCCM, change “Run” from “Hidden” to “Normal”.

Windows 10 – SCCM 2012 R2 SP1 fails with error 0x80070032

I was deploying Windows 10 with SCCM 2012 R2 SP1 and the task sequence failed after “Installing device drivers” with error code 0x80070032 (or 80070032). The “Auto Apply Drivers” task works fine, but doesn’t install a lot of drivers.

The smsts.log file:

Dism failed with return code 50 Failed to add driver to driver store. Code 0x80070032 Failed to provision driver. Code 0x80070032 Exiting with return code 0x80070032

Solution:

  • Make sure you’re using the latest MDT version, compatible with Windows 10.
  • Make sure you’re using at least ADK 10.
  • Check if your boot image has OS Version 10 or higher. If not, create a new boot image with MDT or ADK.

Azure – Deploy and automatically domain join a VM with Azure Automation Runbooks

I was looking for a way to deploy and automatically domain join a VM in Azure. The solution was quite simple: Azure Automation. I found the blog post of DexterPOSH very useful, but the script doesn’t work for me. Follow the steps on his blog and use this script below. I’ll update this post if I find some improvements. Don’t forget to update the domain in the Add-Computer part.

Continue reading

Azure – Automatically deploy a VM in Azure (Runbook)

I was looking for a way to automatically deploy a VM in Azure. The solution was quite simple: Azure Automation. I found the blog post of DexterPOSH very useful, but the script doesn’t work for me. Follow the steps on his blog and use this script below. I’ll update this post if I find some improvements.

Continue reading