Shut Down Remote Workgroup Computers

Posted on May 22, 2017 by Russell Smith in PowerShell, Windows 10, Windows Client OS with

In today’s Ask the Admin, I will show you how to shut down a remote workgroup computer using PowerShell.

 

 

The easiest way to shut down remote Windows 10 devices in a workgroup is by using the PowerShell Stop-Computer cmdlet. This is for those that are not part of an Active Directory domain. Before you can use it, you will need to perform the following three steps on each remote device:

  1. Enable file and printer sharing.
  2. Enable remote administration firewall exceptions.
  3. Change UAC policy for remote administrators.

Enable File and Printer Sharing

Before you can run psshutdown against a remote machine, you will need to enable file and printer sharing on each remote device that you want to shut down. File and printer sharing is disabled by default on workgroup devices. The quickest way to achieve this is by using the command prompt. You will need to open a PowerShell prompt with administrative privileges and run the command below:

Enable Remote Administration

Stop-Computer uses Windows Management Instrumentation (WMI) and requires some firewall ports to be open on each remote device. The following command is deprecated but it still works. It seems to be the only easy way to enable the necessary firewall exceptions for remote administration on a workgroup Windows 10 device.

Change UAC Policy

UAC strips administrator accounts, which connect remotely, of their admin privileges by default. Keep in mind these connect remotely. You can change this behavior by adding the LocalAccountTokenFilterPolicy value to the registry and setting it to true.

Modify default UAC policy in Windows (Image Credit: Russell Smith)

Modify Default UAC Policy in Windows (Image Credit: Russell Smith)


Shut Down a Remote Computer

Once the above prerequisites are in place, start a PowerShell prompt on your management workstation. Run the Stop-Computer cmdlet as shown below and set the -Computer parameter to the name of the remote device you want to shut down. Set -Credential to the name of a user account on the remote device that has local administrative privileges or the right to shut down the computer.

You can shut down more than one device at a time by specifying multiple computers in the -Computer parameter.

Sponsored

In this Ask the Admin, I showed you how to shut down remote Windows 10 workgroup devices using PowerShell.

Tagged with , , , , , ,

Register for this Webinar

How Replication Supports Your Company’s RTOs & RPOs
Join us for this free webinar

Can you have your workloads running within the agreed RTOs? Join this webinar with expert speakers from Veeam to exceed business objectives with an RPTO<15 min for ALL of your application and data.

Thursday, December 14, 2017 at 11 a.m EST