Skip to content

TechDirectArchive

Hands-on IT, Cloud, Security & DevOps Insights

  • Home
  • About
  • Advertise With US
  • Contact
  • Reviews
  • Toggle search form
Home » Windows » Logoff or Restart or Shutdown Windows PC remotely
  • screenshot 2020 03 01 at 21.19.07
    Various ways to hide Windows Taskbar Windows
  • PrintNightMare
    Mitigating ‘PrintNightmare’ Vulnerability: Print Spooler Solutions Security | Vulnerability Scans and Assessment
  • microsoft edge
    How to configure static page in Microsoft Edge browser via Local Group Policy on Windows Windows
  • Cluster
    Install and configure Hyper-V Cluster On Windows Server Virtualization
  • Synology NFS Share
    Add Synology NFS Storage to Proxmox VE for VMs and Backups Storage
  • Screenshot 1
    Using IBM Library with Veeam Network | Monitoring
  • Hub Transport 1
    Hub Transport Server: Resolving ‘Failed to Reach Running Status’ Network | Monitoring
  • FIX RDP Authentication Error
    Fix Remote Connection Issue: An Authentication Error Has Occurred with Code 0x80004005 Windows

Logoff or Restart or Shutdown Windows PC remotely

Posted on 09/11/202006/12/2023 Christian By Christian No Comments on Logoff or Restart or Shutdown Windows PC remotely

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.

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

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) 

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 /?

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.

Rate this post

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 Pocket (Opens in new window) Pocket
  • Share on Mastodon (Opens in new window) Mastodon
  • Share on Bluesky (Opens in new window) Bluesky
  • Share on Threads (Opens in new window) Threads
  • Share on Nextdoor (Opens in new window) Nextdoor
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

  • Windows 11 New Security Features
    Smart App Control: Enabling Phishing Protection in Windows 11 Windows
  • banner 2
    How to Configure NIC Teaming on Windows Server Network | Monitoring
  • Featured image
    How to Disable or Uninstall OneDrive on Windows 10 and 11 Backup
  • Add or remove features   fix dotnet framework issues
    Fix the request to add or remove features on the specified server failed Windows
  • Feature image
    When Should I Use TPM or TPM + PIN Security | Vulnerability Scans and Assessment
  • powershell auto run
    How to pause a PowerShell script Windows

More Related Articles

Windows 11 New Security Features Smart App Control: Enabling Phishing Protection in Windows 11 Windows
banner 2 How to Configure NIC Teaming on Windows Server Network | Monitoring
Featured image How to Disable or Uninstall OneDrive on Windows 10 and 11 Backup
Add or remove features   fix dotnet framework issues Fix the request to add or remove features on the specified server failed Windows
Feature image When Should I Use TPM or TPM + PIN Security | Vulnerability Scans and Assessment
powershell auto run How to pause a PowerShell script Windows

Leave a Reply Cancel reply

You must be logged in to post a comment.

Microsoft MVP

VEEAMLEGEND

vexpert-badge-stars-5

Virtual Background

GoogleNews

Categories

veeaam100

sysadmin top30a

  • screenshot 2020 03 01 at 21.19.07
    Various ways to hide Windows Taskbar Windows
  • PrintNightMare
    Mitigating ‘PrintNightmare’ Vulnerability: Print Spooler Solutions Security | Vulnerability Scans and Assessment
  • microsoft edge
    How to configure static page in Microsoft Edge browser via Local Group Policy on Windows Windows
  • Cluster
    Install and configure Hyper-V Cluster On Windows Server Virtualization
  • Synology NFS Share
    Add Synology NFS Storage to Proxmox VE for VMs and Backups Storage
  • Screenshot 1
    Using IBM Library with Veeam Network | Monitoring
  • Hub Transport 1
    Hub Transport Server: Resolving ‘Failed to Reach Running Status’ Network | Monitoring
  • FIX RDP Authentication Error
    Fix Remote Connection Issue: An Authentication Error Has Occurred with Code 0x80004005 Windows

Subscribe to Blog via Email

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

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

Tags

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

Copyright © 2025 TechDirectArchive

 

Loading Comments...
 

You must be logged in to post a comment.