The other day, I’ve written about an issue with installation of update KB2920189 for Windows Server 2012 R2 (post called [TIP] Latest “Patch Tuesday” & errors installing update). So, the problem I was facing was failing installation on Generation 2 virtual machines, with Secure Boot enabled.
Actually, you can overcome this problem easily by reading the documentation before it happens or… with PowerShell after (OK, you can use GUI also, but who uses it nowadays?)!
As I’ve already mentioned, all you need to do is just one thing – install the BitLocker feature on your server.
1 |
Install-WindowsFeature BitLocker –Restart |
(yes, “-Restart” is optional – if you want, you can restart your server manually, of course)
After that, BitLocker is installed, and you can successfully install the KB2920189 also.
Second (not official) approach on installing this update on Generation 2 virtual machine, as I’ve written in the mentioned post, is to uncheck Secure Boot, install the update, and then check the Secure Boot option again.
This can be easily done using the following script:
1 2 3 4 5 6 |
# stopping the VM Stop-VM "MyVirtualMachine" # disabling Secure Boot Set-VMFirmware -VMName "MyVirtualMachine" -EnableSecureBoot Off # starting the VM back again Start-VM "MyVirtualMachine" |
We can now install this “problematic” update as the Secure Boot feature is disabled:
1 2 3 4 5 6 |
# once again, we are stopping the VM Stop-VM "MyVirtualMachine" # enabling Secure Boot Set-VMFirmware -VMName "MyVirtualMachine" -EnableSecureBoot On # and starting the VM Start-VM "MyVirtualMachine" |
…and Secure Boot is enabled again (“nothing” happened)!
Of course, you can do all of this manually, but then again – why do we have PowerShell?
Cheers!
P.S. I’m no PowerShell expert… just like to automate some things.
1 Comments