Steps to Configure PowerShell (Part 2)

by Dec 3, 2014

PowerShell 2.0 and later

If you use PowerShell at home or in an unmanaged environment, here are some additional steps you should consider to make PowerShell fully functional.

To allow Administrators to connect to your machine remotely and run cmdlets like Get-Process or Get-Service, you may want to enable the Remote Administration firewall exception. Open PowerShell with Administrator privileges, and run this:

PS> netsh firewall set service remoteadmin enable

IMPORTANT: Command executed successfully.
However, "netsh firewall" is deprecated;
use "netsh advfirewall firewall" instead.
For more information on using "netsh advfirewall firewall" commands
instead of "netsh firewall", see KB article 947709
at .


The command returns that there is a newer command and that it is deprecated, but it will still work and enable the firewall exception. The newer command is much harder to use because its parameters are localized, and you would need to know the exact names of the firewall exceptions.

To really use the remoting capabilities of cmdlets, you would also have to start the RemoteRegistry service and set it to auto start:

PS> Start-Service RemoteRegistry

PS> Set-Service -Name Remoteregistry -StartupType Automatic

Now you can use Get-Process, Get-Service, or other cmdlets that expose a –ComputerName parameter to connect to your computer remotely, provided the user running these cmdlets has Administrator privileges on your system.

In a simple peer-to-peer home environment, it would be sufficient to set up Administrator accounts with the same name on each computer.

Twitter This Tip! ReTweet this Tip!