windows

By rashid, 17 April, 2025

Windows PowerShell command to install Windows update. First install the PSWinsowsUpdate module by executing the following command.

Install-Module PSWindowsUpdate
Get-WindowsUpdate
Install-WindowsUpdate

Tags

By rashid, 3 May, 2023

There are several command line that are most useful:

  • /s – Shutdown the computer
  • /r – restart computer
  • /m \\computer – Specify the remote computer
  • /l – Log off
  • /t xxx – Set the time out period before shutdown to xxx seconds
  • /c “comment” – Message to display on the screen before restart or shutdown

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:

Tags