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

  • image 37
    There was an error opening the Trusted Platform Module snap-in: You do not have permission to open the Trusted Platform Module Console Windows
  • ETWindows
    An Overview of Event Tracing for Windows Windows
  • How to Enable Time Limit to Disconnect Remote Desktop After Inactivity
    How to Enable Time Limit to Disconnect Remote Desktop After Inactivity Windows
  • Slide1
    Configure Desktop Wallpaper and Screen Saver Management via GPO Windows
  • scandium
    How to Test Web Applications Using Scandium Configuration Management Tool
  • perform0
    How to work with Windows Performance Toolkit Windows

More Related Articles

image 37 There was an error opening the Trusted Platform Module snap-in: You do not have permission to open the Trusted Platform Module Console Windows
ETWindows An Overview of Event Tracing for Windows Windows
How to Enable Time Limit to Disconnect Remote Desktop After Inactivity How to Enable Time Limit to Disconnect Remote Desktop After Inactivity Windows
Slide1 Configure Desktop Wallpaper and Screen Saver Management via GPO Windows
scandium How to Test Web Applications Using Scandium Configuration Management Tool
perform0 How to work with Windows Performance Toolkit Windows

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

  • final tomcat feature
    How to install Apache Tomcat on Ubuntu Linux
  • intro to azure cloud shell
    The Overview of Azure Cloud Shell AWS/Azure/OpenShift
  • SUBVERSION FEATURE
    How to Install Apache Subversion on a Linux System Linux
  • Create Password Policies via GPO
    How to Create a Password Policy with Group Policy Object Windows
  • RDS Error
    RDP Users are unable to change Passwords Windows Server
  • 2026 04 16 16 08 12 Downloads File Explorer e1776375807966
    Active Directory Vulnerability Assessment with Purple Knight: Domain Controller Owner Is Not an Administrator Windows Server
  • VeeamIgnite2022
    Veeam at Microsoft Ignite 2022 from 12-14 October Backup
  • aks 1
    Azure Storage: How to create Blob Storage and upload files AWS/Azure/OpenShift

Subscribe to Blog via Email

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

Join 1,752 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.