# 2019 Core



# Remotemanagement

### Remote Management aktivieren

Der Core Server lässt sich über eine Arbeitsstation oder einen anderen Server Remote verwalten. Um auf dem entfernten Server Cmdlets ausführen zu können, muss folgendes vorbereitet werden.

**Die Arbeitsstation/Server bereiten wir wie folgt vor, auf dem Core Server ist nichts weiter zu tun:**   
winrm quickconfig  
winrm set winrm/config/client @{TrustedHosts=”\*”}  
chcp 65001

Enable-NetFirewallRule -DisplayGroup "Windows Remote Management" / Nicht sicher ob man dies braucht. Zuerst mit den unteren Befehlen testen

<div class="CodeMirrorContainer" contenteditable="false" data-lang="prettyprint prettyprinted" dir="ltr" id="bkmrk-%23-enable-windows-fir"><textarea style="display: none;">\# Enable Windows Firewall Remote Management Set-NetFirewallRule –Name “RemoteFwAdmin-In-TCP” –Enabled True Set-NetFirewallRule –Name “RemoteFwAdmin-RPCSS-In-TCP” –Enabled True</textarea><div class="CodeMirror cm-s-darcula"><div style="overflow: hidden; position: relative; width: 3px; height: 0px; top: 5px; left: 35px;"><textarea autocapitalize="off" autocorrect="off" readonly="readonly" spellcheck="false" style="position: absolute; bottom: -1em; padding: 0px; width: 1000px; height: 1em; outline: none;" tabindex="0"></textarea></div><div class="CodeMirror-vscrollbar" cm-not-content="true" tabindex="-1"><div style="min-width: 1px; height: 0px;"></div></div><div class="CodeMirror-hscrollbar" cm-not-content="true" tabindex="-1"><div style="height: 100%; min-height: 1px; width: 0px;"></div></div><div class="CodeMirror-scrollbar-filler" cm-not-content="true"></div><div class="CodeMirror-gutter-filler" cm-not-content="true"></div><div class="CodeMirror-scroll" tabindex="-1"><div class="CodeMirror-sizer" style="margin-left: 30px; margin-bottom: -15px; border-right-width: 35px; min-height: 50px; min-width: 455.641px; padding-right: 0px; padding-bottom: 0px;"><div style="position: relative; top: 0px;"><div class="CodeMirror-lines" role="presentation"><div role="presentation" style="position: relative; outline: none;"><div class="CodeMirror-measure"><div class="CodeMirror-linenumber CodeMirror-gutter-elt"><div>3</div></div></div><div class="CodeMirror-measure"></div><div style="position: relative; z-index: 1;"></div><div class="CodeMirror-cursors"><div class="CodeMirror-cursor" style="left: 4px; top: 0px; height: 14px;"></div></div><div class="CodeMirror-code" role="presentation"><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="left: -30px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 21px;">1</div></div>```
<span role="presentation" style="padding-right: 0.1px;">#  Enable Windows Firewall Remote Management</span>
```

</div><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="left: -30px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 21px;">2</div></div>```
<span role="presentation" style="padding-right: 0.1px;">Set-NetFirewallRule –Name “RemoteFwAdmin-In-TCP” –Enabled True</span>
```

</div><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="left: -30px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 21px;">3</div></div>```
<span role="presentation" style="padding-right: 0.1px;">Set-NetFirewallRule –Name “RemoteFwAdmin-RPCSS-In-TCP” –Enabled True</span>
```

</div></div></div></div></div></div><div style="position: absolute; height: 35px; width: 1px; border-bottom: 0px solid transparent; top: 50px;"></div><div class="CodeMirror-gutters" style="height: 85px; left: 0px;"><div class="CodeMirror-gutter CodeMirror-linenumbers" style="width: 29px;"></div></div></div></div></div>cmdkey /add:192.168.0.70 /user:Administrator -&gt; mal als Info gespeichert

# Firewall

Windows Firewall offers three firewall profiles:<span class="ezoic-adpicker-ad" id="bkmrk-"></span>

- **Domain profile**: applies to networks where the host system can authenticate to a domain controller.
- **Private profile**: a user-assigned profile and is used to designate private or home networks.
- **Public profile**: this is the default profile. It is used to designate public networks such as Wi-Fi hotspots at coffee shops, airports, and other locations.

## <span class="ez-toc-section" id="bkmrk--0"></span>Get status of the Windows Firewall with PowerShell

First, let’s get the current status of the Windows Firewall. We will be using the [Get-NetFirewallProfile](https://docs.microsoft.com/en-us/powershell/module/netsecurity/get-netfirewallprofile?view=win10-ps) cmdlet.

<div id="bkmrk-ps-c%3A%5C%3E-get-netfirew">```powershell
<span class="token function">PS</span> C:\> Get<span class="token operator">-</span>NetFirewallProfile <span class="token punctuation">|</span> <span class="token function">Format-Table</span> Name<span class="token punctuation">,</span> Enabled

Name    Enabled
<span class="token operator">--</span>-<span class="token operator">-</span>    <span class="token operator">--</span>-<span class="token operator">--</span>-<span class="token operator">-</span>
Domain     True
Private    True
Public     True
```

<div><div><button type="button">Copy</button></div></div></div>We have **three profiles**: Domain, Name, and Public. Windows Firewall is enabled on all three profiles.

## Disable Windows Firewall in Windows Server 2012/2016/2019

Disable Windows Firewall on all three profiles.

<div id="bkmrk-ps-c%3A%5C%3E-set-netfirew">```powershell
<span class="token function">PS</span> C:\> <span class="token function">Set</span><span class="token operator">-</span>NetFirewallProfile <span class="token operator">-</span>Profile Domain<span class="token punctuation">,</span> Public<span class="token punctuation">,</span> Private <span class="token operator">-</span>Enabled False
```

<div><div><button type="button">Copy</button></div></div></div>## <span class="ez-toc-section" id="bkmrk--1"></span>Check Windows Firewall status

Check the status after you disable the Firewall on all three profiles. Run the **Get-NetFirewallProfile** cmdlet.<span class="ezoic-adpicker-ad" id="bkmrk--2"></span>

<div id="bkmrk-ps-c%3A%5C%3E-get-netfirew-0">```powershell
<span class="token function">PS</span> C:\> Get<span class="token operator">-</span>NetFirewallProfile <span class="token punctuation">|</span> <span class="token function">Format-Table</span> Name<span class="token punctuation">,</span> Enabled

Name    Enabled
<span class="token operator">--</span>-<span class="token operator">-</span>    <span class="token operator">--</span>-<span class="token operator">--</span>-<span class="token operator">-</span>
Domain    False
Private   False
Public    False
```

</div>

# Firewall - 2

There are actually a whole series of groups that you need to look at for remote administration, depending upon what you want to remotely manage. The name of the firewall group is Windows Firewall Remote Management.

You can find the names of the individual rules, if you want to ensure you just enable the specific ones you want, by issuing the following command:

Get-NetFirewallRule | Where { $\_.DisplayGroup –Eq “firewall group”} | Format-Table  
Replace firewall group with with the appropriate managment group. The ones that relate to remote management are:

group="File and Printer Sharing"

group="Remote Service Management"

group="Performance Logs and Alerts"

group="Remote Event Log Management"

group="Remote Scheduled Tasks Management"

group="Remote Volume Management"

group="Remote Desktop"

group="Windows Firewall Remote Management"

group="windows management instrumentation (wmi)"