I have a Windows Server 2012 R2 instance running on Hyper-V that I'm attempting to update from PowerShell 4.0 to PowerShell 5.1. Once the update has been applied, I reboot the server to apply the updates and immediately afterwards, Windows displays:
We couldn't complete the updates
Undoing Changes
Don't turn off your computer
Researching online has led me to believe that it is an issue with the Secure-Boot option in Hyper-V. When I attempt to edit this option in Powershell:
Set-VMFirmware "Build Server" -EnableSecureBoot Off
I am given the error:
Set-VMFirmware : A parameter is invalid. Generation 1 virtual machines do not support the VMFirmware cmdlets
How can I find the root cause of this issue, and if disabling the Secure-Boot in Hyper-V is the solution, how can I do this on a Gen1 VM?
EDIT: After attempting to update Windows with the latest patches, I received the same "couldn't complete the updates Undoing changes" message. This seems to be a problem with the windows update, and not PowerShell specifically...