Windows PowerShell command to install Windows update. First install the PSWinsowsUpdate module by executing the following command.
Install-Module PSWindowsUpdate
Get-WindowsUpdate
Install-WindowsUpdate
Windows PowerShell command to install Windows update. First install the PSWinsowsUpdate module by executing the following command.
Install-Module PSWindowsUpdate
Get-WindowsUpdate
Install-WindowsUpdate
There are several command line that are most useful:
Now let’s move on to some examples. To restart remote computer (hostname: pc2):
shutdown /r /m \\pc2
To restart remote computer (hostname: pc2) with a custom message: