

The PSWindowsUpdate module also allows you to install updates and uninstall patches causing problems after a Patch Tuesday rollout. You can always change 20 for the number of updates you want to see in the command. Once you complete the steps, the device may need to restart to complete the process. Type the following command to view a list of the 20 most recent updates and press Enter: Get-WUHistory | Select-Object -First 20 Type A to accept and install the module and press Enter. If i could get the windows version into a variable i could build a conditional to take the right path.
POWERSHELL GET WINDOWS VERSION UPDATE
Type the following command to install the PowerShell module to update Windows 10 and press Enter: Install-Module PSWindowsUpdate I'm making some batch files to personalise my windows installations faster, but I need my batch to take a road depending on which Windows version it's running on.

Using this command we can query the WMI class Win32OperatingSystem to get the OS version number: 1 (Get-WmiObject Win32OperatingSystem). Search for PowerShell, right-click the top result, and select the Run as administrator option. In PowerShell, we can find operating system details in different ways, but to be safe we can use the WMI-based cmdlet Get-WmiObject, this command is compatible with Windows PowerShell 2.0. To see the history list of updates installed on the computer, use these steps: Check Windows 10 update history from PowerShellĪlternatively, you can use the Microsoft PSWindowsUpdate module to manage updates through PowerShell.

Remember to change “5015807” with the KB number for the update you want to uninstall. You’ll also see the installation date, description, hotfixid (KB number), and more.Īdditionally, if you want to uninstall a specific Windows 10 update using Command Prompt, you can use its KB number and run this command: wusa /uninstall /kb:5015807 /quiet. If you want to find a specific update, you can use the KB number, typing the following command and pressing Enter: wmic qfe | find "5020872"Ĭheck the “Windows Update history” of your computer.Īfter you complete the steps, you will get a list with links to the Microsoft support website to know the contents of the updates. Type the following command to view the update history and press Enter: wmic qfe list With system information you can only get the build with that value and go to Google to get the respective version. Search for Command Prompt and click the top result to open the app. To view the history list of Windows 10 updates using Command Prompt: Check Windows 10 update history from Command Prompt Microsoft hasn’t completely moved all the update settings to this app, which means that if an update is causing problems, you’ll need to click the “Uninstall updates” link to open Control Panel to remove it. If you click the link for each update, it will open on the Microsoft support website, which will offer more insights about the changes, improvements, and known issues (if any) about that particular update. Quick note: If you want to see all available updates for Windows 10, check out the Windows 10 version release tracker guide.
