Windows 8.1 or Windows Server 2012 R2 won’t get updates in audit mode

When you need to customize an installation of Windows 8.1 or Windows Server 2012 and enter audit mode you can’t install any updates with the Windows Update GUI, it’s getting stuck at checking for updates. This is because Windows Update is locked when the when the audit mode/OOBE is still in progress. When checking the logfiles of Windows Update (WindowsUpdate.log) it show this:

There are some workarounds to get Windows Updates to your installation, like making a temporary user, but the PowerShell option I want to mention here.

102314_0950_Windows81or1

  1. First step is to download the Windows Update PowerShell Module from the TechNet Script Center Repository.
  2. Copy the whole module folder (after unzipping) to %ProgramFiles%\WindowsPowerShell\Modules or you can use %UserProfile%\Documents\WindowsPowerShell\Modules, if you choose the last one, then the PowerShell Module is removed after a sysprep.
    pswindowsupdatelocation
  3. Fire up PowerShell as administrator.
  4. Set-ExecutionPolicy RemoteSigned
  5. Import-Module PSWindowsUpdate
  6. Get-WUInstall
  7. You’ll get some prompts what updates to accept or decline

And after the reboot you can see what is happened.

updatesinstalled

Edit: Changed the location to copy the PowerShell Module according this TechNet article. The old location used was %Windir%System32WindowsPowerShellv1.0Modules but this location is reserved for modules that ship with Windows. Do not install modules to this location.

 

  • Great post !

  • I had to do:

    Set-ExecutionPolicy Unrestricted

    to get it to run.

    Thanks for this “hack!”

    • Woops, my bad. After moving the extracted folder to the specified location, it worked like you described.

  • Markus

    wow great, thanks! Saved me lots of time!

    • Mike

      Thanks!

  • Grace Thompson

    how do i do step 2???

    • BVucinec

      I’ll need to update the post, the location mentioned in the blogpost is wrong, because the location is reserved for modules that ship with Windows. Do not install modules to this location.
      You’ll need to copy the files to either %UserProfile%DocumentsWindowsPowerShellModules or %ProgramFiles%WindowsPowerShellModules.

      I hope this article on TechNet can help you with installing the PowerShell Module: Installing Modules.

  • Actually I’d put the files in %UserProfile%DocumentsWindowsPowerShellModules – because I don’t want them around afterwards…

    • BVucinec

      Thanks for the comment, I’ve added this to the post.

  • Pingback: OOBE Problems with Windows Server 2012R2 Updates | Danny McCaslin()