Enable and Disable WinRM

Ines ROUISSI 20 Reputation points
2023-06-23T10:09:38.4566667+00:00

Hi,

For security reasons, our company wants to disable the WinRM service, but we don't know the impact of disabling it on the production platform.

So we thought about the ability to disable the service and re-enable it automatically via GPO as needed without any user interaction?

I don't know if it's possible or not, and if YES how can we do it?

Can anyone help me please.

thank you.

Windows Server PowerShell
Windows Server PowerShell
Windows Server: A family of Microsoft server operating systems that support enterprise-level management, data storage, applications, and communications.PowerShell: A family of Microsoft task automation and configuration management frameworks consisting of a command-line shell and associated scripting language.
5,561 questions
{count} votes

Accepted answer
  1. Limitless Technology 44,411 Reputation points
    2023-06-26T17:54:50.9133333+00:00

    Hello there,

    To enable or disable WinRM (Windows Remote Management) via Group Policy, you can follow these steps:

    Open the Group Policy Management Console (GPMC): On a domain controller or a computer with the GPMC installed, open the Group Policy Management tool.

    Create a new Group Policy Object (GPO) or edit an existing one: Right-click on the desired domain or organizational unit (OU) and select "Create a GPO in this domain, and Link it here" or "Edit" if you already have a GPO in place.

    Configure the WinRM settings:

    For enabling WinRM: In the Group Policy Editor, navigate to "Computer Configuration" > "Policies" > "Administrative Templates" > "Windows Components" > "Windows Remote Management (WinRM)".

    Double-click on the "Allow remote server management through WinRM" policy setting.

    Select the "Enabled" option and click "OK".

    For disabling WinRM: In the Group Policy Editor, navigate to "Computer Configuration" > "Policies" > "Administrative Templates" > "Windows Components" > "Windows Remote Management (WinRM)".

    Double-click on the "Disallow remote server management through WinRM" policy setting.

    Select the "Enabled" option and click "OK".

    Apply the Group Policy Object: Link the GPO to the appropriate domain, site, or OU where you want to enable or disable WinRM.

    I used AI provided by ChatGPT to formulate part of this response. I have verified that the information is accurate before sharing it with you.

    Hope this resolves your Query !!

    --If the reply is helpful, please Upvote and Accept it as an answer–


1 additional answer

Sort by: Most helpful
  1. MotoX80 34,516 Reputation points
    2023-06-26T12:11:47.42+00:00

    Well you can block the incoming traffic with the Windows firewall.

    User's image

    At the company that I used to work for, the auditors or someone from the security team, would run software that scanned our network and produced a report on vulnerabilities. Typically, this report listed the CVE vulnerability id which we could then research to see if it really applied to our environment. Sometimes the report would list the KB123456 patch that needed to be installed to mitigate the vulnerability.

    Do you have a regularly scheduled patch install process? Are your servers up to date with security related updates? Did anyone give you a CVE id that explains the vulnerability?


Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.