Information Technology Reference
In-Depth Information
■
IPAddress
is the static IP address you intend to set (in this example,
192.168.15.2
).
■
PrefixLength
is the prefix length (another form of subnet mask) for the IP address
you intend to set (in this example,
24
).
■
DefaultGateway
is the default gateway (in this example,
192.168.15.1
).
4.
In Windows PowerShell, run
Set-DNSClientServerAddress -InterfaceIndex 10
-ServerAddresses 192.168.15.4
.
■
InterfaceIndex
is the value of
IfIndex
from step 2.
■
ServerAddresses
is the IP address of your DNS server.
5.
To add multiple DNS servers, run
Set-DNSClientServerAddress -InterfaceIndex 10
-ServerAddresses 192.168.15.4,192.168.15.5
.
■
In this example,
192.168.15.4
and
192.168.15.5
are both IP addresses of DNS
servers.
Another Server Core task that you may need to configure is setting the server name. In
PowerShell, run the following command to rename the server:
Rename-Computer
.
As an administrator, you may also want to run PowerShell commands on one system
to run on another system. You can enable Windows PowerShell Remoting by using the
Enable-PSRemoting
command.
Configuring the Windows Firewall
The final item to examine is configuring Windows Firewall remotely. Microsoft Server
2012 R2 Windows Firewall will be discussed in full detail in Chapter 6, but since I am
discussing remote administration, let's look at the commands needed to configure Windows
Firewall remotely.
Netsh advfirewall
is a command-line (with Administrator privileges) tool for Windows
Firewall with Advanced Security that helps with the creation, administration, and
monitoring of Windows Firewall and IPsec settings and provides an alternative to console-
based management.
To enter into the
netsh advfirewall
prompt, you must first type
netsh
. After you
enter the
netsh
prompt, you then type
advfirewall
, which will bring you to the
netsh
advfirewall
prompt. When you enter
netsh advfirewall
, it enters you into a
netsh
advfirewall
prompt that looks like the following:
netsh advfirewall>
prompt
Once you are at the
netsh firewall
prompt, you can use the question mark to get a list
of all available options (
netsh advfirewall>?
). Figure 4.14 shows you the list of available
options.
Search WWH ::
Custom Search