Powershell – Remote Management of Windows Systems

This article should held to initially configure your windows clients to be managed remotely by powershell. There are some configurations needed so that the clients can be accessed remotely.

  • Configuration of the firewall
  • Configuration of the WinRM service

It can be configured either by GPO (group policy) or remotely by using WMI and a script.

When configured properly, you can access the clients with powershell:

 


Configure Remote Access

GPO Settings

You need to make the following changes in the clients GPO settings.

Enabling von WinRM

Policies > Administrative Templates > Windows Components > Windows Remote Management (WinRM) > WinRM Service

  • Server 2008 R2 and later: Open the Allow Remote Server management through WinRM policy setting.
  • Server 2008 and earlier: Open the Allow automatic configuration of listeners policy setting.
  • Set the Policy to Enabled.
  • Set the IPv4 and IPv6 filters to * unless you need something specific there (check out the help on the right).

Firewall Configuration

Configure the firewall settings so that WinRM remote access is allowed.

  • Policies > Administrative Templates > Network > Network Connections > Windows Firewall > Domain Profile
    inbound port exceptions policy setting.
    5985:TCP:*:enabled:WSMan

WinRM Service Autostart

  • Policies > Windows Settings > Security Settings > System Services
    Windows Remote Management (WS-Management) service.
    Autostart

Execute Scripts and Commands on Remote System

Posted in Blog, Uncategorized and tagged , .

Leave a Reply

Your email address will not be published. Required fields are marked *