Skip to content

TechDirectArchive

Hands-on IT, Cloud, Security, Veeam & DevOps

  • Home
  • About
  • Advertise With US
  • Reviews
  • Contact
  • Toggle search form

Logoff or Restart or Shutdown Windows PC remotely

Posted on 09/11/202031/08/2026 Christian By Christian No Comments on Logoff or Restart or Shutdown Windows PC remotely
  1. Home
  2. Windows
  3. Logoff or Restart or Shutdown Windows PC remotely
Screenshot of a Windows notification stating 'You're about to be signed out. Windows will shut down in less than a minute.' with a 'Close' button.

In this article, we shall discuss how to Logoff or Restart or Shutdown Windows PC remotely. There are times you (the system Administrator) may want to reboot your PC due to undesired behavior on your PC. During and after the installation of new programs (software and hardware), most times, you may need to restart your device. This will shut off all processes so that the Kernal can be re-established with the new software or hardware. Please see Handy Shutdown commands available in Windows, and how to use command prompt to shutdown and restart your computer.

Mac is a Unix environment, everything is cleared during the “shut down” and ‘restart” process, thereby clearing all processes, cache, and memory and, giving the device a complete start.

Note: Shutting down a computer is a way to power down all processes of the machine. “It’s very similar to a restart but with the exception that your computer won’t turn back on again until someone powers it up. The ways to shut down Windows 10 are similar to the restart options.

Why is a restart needed when completing a new install or uninstall?

And why is a computer restart during Windows Operating System updates needed?

Shutting down a Windows computer actually creates a deep hibernation file that the PC later leverages to allow for Fast Startup.

  • A restart, on the other hand, completely kills all processes, clears the RAM, and clears the processor cache.
  • Shutting down a computer is a more energy-efficient and environmentally friendly-way to leave a PC unattended.

Leaving a PC in sleep mode results in some power usage by the RAM and from the storage of open files and programs

Here are the steps to have your device shut down and restarted: Windows has various ways to shut down and restart remote computers natively via the Command Prompt as shown below.

Also, see How to prevent a remote shutdown and restart in Windows, and How to prevent users from shutting down in a Virtual Machine.

1: Restart Your Windows Device With a Custom Message

Open the command prompt, and type the following commands below.

shutdown /m \techdA101 /r /c “Demonstration purpose"

I used multiple switches in this command e.g.
– /m is for remote Servers. RemoteServerName needs to be replaced by the name of my server above (techdara101) which you wish to.
– /r is for restart it can be replaced by /s if you want to shut down the server.
– To add a comment, use the switch /c followed by the message as shown below and press Enter on your keyboard when done.

Command Prompt window displaying a shutdown command for a Windows computer, including user directory and version information.

2: Shutdown Windows PC remotely

The Server remotely: By using the command below, another dialogue box will open up as shown below, enter a comment, and press ok.

shutdown -i
Command Prompt window displaying the 'shutdown -i' command, with a Remote Shutdown Dialog visible on the right. The dialog options include 'Restart' selected, a warning display time of 30 seconds, and fields for the shutdown reason and comment.

3: Restart Windows PC remotely

By default, this will prompt the remote computer and give it about a minute before it restarts.

shutdown /r /m \techdA101

4: Immediate Restart no Countdown: of Windows PC

If you want to immediately restart with no countdown or message use this command.

shutdown /r /m \techdA101 /t 0

5: Log User off on Remote Computer

If you just want to log a user off, use the remote computer command.

shutdown /l /m\\techdA101

Restart, Shutdown Windows PC remotely via PowerShell

You can use PowerShell in a similar faction as CMD to have your remote PC restarted or shut down. Follow the steps discussed below.

1: Restart a computer

This command will immediately restart a remote computer. The -Force option will force a restart even if a user is logged on.

Restart-Computer -ComputerName techdA101 -Force

2: Shutdown a Windows PC Remotely via PowerShell

This command will shut down a remote computer. Use the -Force to force a shutdown as shown below even if a user is logged on

Stop-Computer -ComputerName techdA101 -Force

3: Restart a list of computers

This is handy if you have several computers to restart. Just list all the computers you want in a text file and save it somewhere on your PC and add that to the PowerShell command as shown below.

restart-computer (get-content C:\Users\Christian\Desktop\listofcomputers.txt) 
Screenshot of Windows PowerShell displaying a command to restart computers listed in a text file.

4: Shutdown two devices

Us the following commands to have this task done.

Stop-Computer -ComputerName "techdA101", "techdA102"

Here are the various switches you’ll want to use in conjunction with this command to control the behavior. For a full list of commands, you can type the command below.

shutdown /?
Command Prompt displaying shutdown command options and usage instructions.

This will output several options including the following most commonly used options: The most common switches to use are the /r (to reboot) or /s (to shutdown).

/i   Display the graphical user interface (GUI). This must be the first option.
/m \computer Specify the target computer.
/c Print comment to screen of computer before rebooting or shutting down.
/l Log off. This cannot be used with /m.
/s Shutdown the computer.
/sg Shutdown the computer. On the next boot, restart any registered applications.
/r Full shutdown and restart (reboot) the computer.
/g Full shutdown and restart (reboot) the computer.
After the system is rebooted, restart any registered applications.
/a Abort (cancel) a system shutdown.
/p Turn off the computer with no time-out or warning.
/h Hibernate the computer.
/fw Combine with a shutdown option to cause the next boot to go to the firmware user interface.
/e Document the reason for an unexpected shutdown of a computer.
/t xxx Set the time-out period before shutdown to xxx seconds.
/f Force running applications to close without forewarning users.

I want to point out that you’ll need the Remote Registry service enabled and started on the remote computer and the Windows Management Instrumentation (WMI) firewall rule enabled on the remote computer for this to work.

You’ll also need to ensure your user account has administrator permissions on the remote computer or the command will fail. See this guide for “Windows Active Directory Administrative tools Shortcut command Keys” and this guide for “Windows 10 Administrative Shortcut command keys.

I hope you found this blog post helpful. You have learned how to Logoff or Restart or Shutdown Windows PC remotely. If you have any questions, please let me know in the comment session.

Thank you for reading this post. Kindly share it with others.

  • Share on X (Opens in new window) X
  • Share on Reddit (Opens in new window) Reddit
  • Share on LinkedIn (Opens in new window) LinkedIn
  • Share on Facebook (Opens in new window) Facebook
  • Share on Pinterest (Opens in new window) Pinterest
  • Share on Tumblr (Opens in new window) Tumblr
  • Share on Telegram (Opens in new window) Telegram
  • Share on WhatsApp (Opens in new window) WhatsApp
  • Share on Mastodon (Opens in new window) Mastodon
  • Share on Bluesky (Opens in new window) Bluesky
Windows Tags:restart, Restart option windows server, Windows 10

Post navigation

Previous Post: The logon attempt failed for the remote desktop connection
Next Post: view or change programs that run on startup on Windows

Related Posts

  • ADO Self hosted agent
    How to Create Self-Hosted Agent for Azure DevOps Pipelines Automation
  • logon failure and requested session denied
    Logon Failure: User has not been granted the requested logon type Windows
  • How to Install RSAT on Windows 11
    How to Install and Uninstall RSAT on Windows 11 Windows
  • Screenshot 2020 08 07 at 21.09.01
    Error 0x204: Unable to Connect to Remote PC [Part 2] Windows
  • How to Fix 0xc000007b Error banner
    Fix 0xc000007b Error on Windows 11 While Launching a Game Windows
  • MAP virtual disk error
    Install Workstation Pro 17: Fix failed to initialise library for mounting and unmounting virtual disks Virtualization

More Related Articles

ADO Self hosted agent How to Create Self-Hosted Agent for Azure DevOps Pipelines Automation
logon failure and requested session denied Logon Failure: User has not been granted the requested logon type Windows
How to Install RSAT on Windows 11 How to Install and Uninstall RSAT on Windows 11 Windows
Screenshot 2020 08 07 at 21.09.01 Error 0x204: Unable to Connect to Remote PC [Part 2] Windows
How to Fix 0xc000007b Error banner Fix 0xc000007b Error on Windows 11 While Launching a Game Windows
MAP virtual disk error Install Workstation Pro 17: Fix failed to initialise library for mounting and unmounting virtual disks Virtualization

Leave a Reply Cancel reply

You must be logged in to post a comment.

Microsoft MVP

vexpert-badge-stars-5

Virtual Background

VEEAMLEGEND

Categories

veeaam100

Veeam Vanguard

  • Temp Files
    Recover Temp Files using Disk Drill etc on Windows 10 and 11 Windows
  • How to Enable High Dynamic Range on Windows 11
    How to Enable High Dynamic Range on Windows 11 Windows
  • XCP ng installation and VM creation
    A-Z of XCP-ng and Xen Orchestra setup and VM Creation Virtualization
  • Windows Productivity Tips
    Windows Productivity Tips To Get The Most Out Of Your PC Windows
  • fghj
    Windows Profile: How to determine your windows username Windows
  • Windows 10 Upgrade 1 1
    Perform an in-place upgrade from Windows Server 2016 to Windows Server 2019 Windows Server
  • showdefenderupdate
    View Microsoft Defender Antivirus Update Details on Windows Image Windows
  • Burn ISO on MAC Proxmox installation
    Create a bootable USB on Mac: Proxmox VE Setup Virtualization

Subscribe to Blog via Email

Enter your email address to subscribe to this blog and receive notifications of new posts by email.

Join 1,757 other subscribers
  • RSS - Posts
  • RSS - Comments
  • About
  • Authors
  • Write for us
  • Contact
  • Advertise with us
  • General Terms and Conditions
  • Privacy policy
  • Feedly
  • Telegram
  • Youtube
  • Facebook
  • Instagram
  • LinkedIn
  • Tumblr
  • Pinterest
  • Twitter
  • mastodon
  • Bsky

Tags

Active Directory Azure Bitlocker Microsoft Windows PowerShell WDS Windows 10 Windows 11 Windows Deployment Services Windows Server 2016

Copyright © 2026 TechDirectArchive

Loading Comments...

You must be logged in to post a comment.