Another way of enabling PS Remoting, if we want to do it on
multiple machines, is to use Group Policy Management.
So what we can do here is I can say Group Policy Management and launch
this tool from the domain controller itself, and we just scroll this
down and expand into our domain, and you'll see we have a default domain
policy listed here. Now from the default domain policy, what we can
actually do is choose Edit, and this will then launch the actual domain
configuration tool.
Now from here,
what we can do is go into the computer configuration, and
you'll see that we have policies, which obviously breaks
down our configuration settings.
We can then go into Administrative Templates, which are from the local machine.
We can then go directly into Windows Components,
which is a vast list, so I'm actually going to click on here to show it in
the right‑hand side. Then we can go down and scroll through all the
different options that are there, but what you'll see is we have something
called Remote, kind of Windows components.
We can then have Remote Management.
You've got Remote Shell.
But if I go into Remote Management,
which is the WinRM, double‑click, you'll see we have a Client and a server.
We're actually going to go into that, well, Service.
We're going to go into the Service option here. And right at the top
there is Allow server management through WinRM. So I'm going to
double‑click this, and you'll see that we can say Enabled, and then
what we get is some property values.
What we're going to do here is specify the wildcard,
which means this will allow any machine or any IP address to be
able to communicate to WinRM on this machine.
So I'm going to click Apply and OK, and that's configured our
basic setting within that Group Policy.
Now once we've done that, that works great.
But the next thing we have to do is we also need to do, if you remember, when
we ran the PowerShell, it enabled firewall rules as well.
So we need to go into the same policy and kind of
expand things a little bit differently.
So I'm actually going to come out of my Admin Templates,
go to Windows Settings here,
then I'm going to wait for that to expand and go to Security Settings.
Once that expands, we can go down to the Windows firewall option,
which is actually going to be here, Windows firewall,
Defender Firewall with Advanced Security, and then we can
click directly into that firewall option.
Now what this does is this will give you the connection to the
firewall that effectively we're going to push this out to. So what
we can do here is we can go over this side. You'll see we've got
Inbound Rules and Outbound Rules.
We can then expand, and you'll see a list of the inbound rules,
which is blank because it's a blank policy.
But what I can do here is I can go through the
process of creating a new inbound rule.
So I'm going to say New Rule. We'll wait for this to launch.
I'm then going to go through and say Predefined because I want to pick a
specific service, and this will be the Windows Remote Management, so I'm
going to select that option there. I'll choose Next, and you'll see, what
it does is it has both options selected, so a public profile, and a
domain, and a private one.
So we'll choose Next.
I'm going to say Allow connection, and click Finish.
That will add the two rules that are required for the firewalls.
So, that's our next one that's there.
So we've created our two inbound rules.
Lastly,
what we actually have to do is configure any services. So what we're going
to do is go back through the structure here, and you'll see System
Services. We'll click onto System Services, and you'll see there's a whole
host of them here. And we're going to scroll all the way down to the
Windows Remote Management one, which should be here.
We're going to double‑click. We can say Define for this policy,
which is the option that we want to have, and I'm going to say Automatic.
So that's going to be the configuration setting that I wish to go with.
I'm going to say Apply.
We could also edit any of the security if we needed,
but I'm going to click OK. So my Windows Remote Management
one is now configured for Automatic, which is what we want it to do.
We want that to automatically start up with no options to kind of change.
We just say, hey, automatically start.
So that means when a machine logs into the environment,
the default Group Policy will push an update out to all of
those machines, which will effectively turn on the Windows
Remote Management service.
It will add the inbound rules, and it will enable
and allow WinRM remote management.
So, the two core ways of enabling everything, one was the
PowerShell option that we looked at previously, and the
second one is Group Policy.
So if you are planning to do PowerShell remote management for multiple machines,
then this is the option to use to use Group Policy management and create the
policy that will create everything that's needed instead of trying to manually run the PowerShell commands across multiple machines.