There is a Powershell module for Windows Update. In 3 simple steps for running Windows Update through Powershell. Run the following commands step by step:
Note: Run the PowerShell using administrative rights.
Step 1: Install the Windows update module in PowerShell
Install-Module PSWindowsUpdate
Step 2: Check for updates
Get-WindowsUpdate
Step 3: Install the available updates
Install-WindowsUpdate