dsccommunity / NetworkingDsc

DSC resources for configuring settings related to networking.
https://dsccommunity.org
MIT License
226 stars 88 forks source link

Help with RemoteMachine Parameter #454

Open gavin58582 opened 4 years ago

gavin58582 commented 4 years ago

I am trying to use your script to configure my firewall for SQL AlwaysOn Clusters where full access is given to the nodes in the cluster via a Firewall rule. We are moving to DHCP so I want to use the Remote Machine Name so I would like to know how the RemoteMachine Parameter works. Am I able to put in the AD Computer account Name or does it have to be the SID of the computer account?

PlagueHO commented 4 years ago

Hi @gavin58582 - basically the resource calls the New-NetFirewallRule cmdlet (see https://docs.microsoft.com/en-us/powershell/module/netsecurity/new-netfirewallrule?view=win10-ps) to configure the Firewall rule. So it takes the same format for the -RemoteMachine parameter which is an SDDL string. E.g.

RemoteMachine         = 'O:LSD:(D;;CC;;;S-1-5-21-1915925333-479612515-2636650677-1621)(A;;CC;;;S-1-5-21-1915925333-479612515-2636650677-1620)'

So, essentially the answer is no, it doesn't allow the Computer Name to be used.

PlagueHO commented 3 years ago

Hi @gavin58582 - can I close this one?