Managing Windows Server installations

When Server Core starts, you will see the following screenshot. As there is no GUI, here in the console window is where you perform local management of a server:

Typically, Server Core is managed remotely, but it has tools that are built for managing a server locally as well. You can manage Windows Server Core using Server Manager, Windows PowerShell, a remote server, or RSAT.

The typical first steps you need to take to configure and manage Server Core usually involve the following:

  1. Establishing connectivity—setting IP address, subnet mask, and default gateway
  2. Configuring the firewall
  3. Activating the server
  4. Configuring the name resolution
  5. Joining a domain
  6. Enabling PowerShell remoting and remote access

After Server Core has been installed, the first task is to change the administrator password.

If you close the Command Prompt window by accident, don't panic! You don't have to restart the server to get the console back. Press the Ctrl + Alt + Del key combination and the command window will return.

Windows PowerShell is one of the most common management tools for local management, and especially for remote management. Understandably, these commands also work with other server versions, not just with Server Core. To start a PowerShell session, type powershell at a command prompt.

The Get-NetIPConfiguration command retrieves the current network configuration, including network interfaces, IP addresses, and DNS servers. The Get-NetIPAddress command displays the current IP address configuration, including IPv4, IPv6, and IP addresses with which these addresses are associated.

The following command shows the IP configuration information for all configured network interfaces on a computer, including loopback interfaces, virtual interfaces, and disconnected interfaces:

Get-NetIPConfiguration -all

The following command gathers configuration information for specific network interface:

Get-NetIPConfiguration -InterfaceIndex 9

The Get-NetIPInterface command shows information about an IP interface, while the Set-NetIPInterface command can be used to modify an IP interface.

To configure a server with a static IP address, use the New-NetIPAddress command. This sets a static IP address, a subnet mask, and a default gateway to an interface with an index value of 7:

New-NetIPaddress -InterfaceIndex 7 -IPAddress 192.168.10.20 -PrefixLength 24 -DefaultGateway 192.168.10.1

To configure a DNS client server address with values of 192.168.10.2 and 192.168.10.3, type the following command:

Set-DNSClientServerAddress –InterfaceIndex 7 -ServerAddresses 192.168.10.2, 192.168.10.3

To join a computer to a workgroup or a domain, use the Add-Computer cmdlet:

Add-Computer -ComputerName "SRVCORE" -LocalCredential "SRVCOREAdminLocal" -DomainName "MCSACERTGUIDE.LOCAL" -Credential MCSACERTGUIDE.LOCALAdminDomain -Restart -Force

This command adds the SRVCORE computer to the MCSACERTGUIDE.LOCAL domain and uses the LocalCredential parameter to supply a user account that has permission to connect to the SRVCORE computer. The -Credential parameter specifies a user account that has permission to join computers to the domain, while the -Restart parameter restarts a computer after a join operation completes. Finally, the -Force parameter suppresses any user confirmation messages.

To activate a server, simply use the slmgr.vbs -ipk <product_key> command, followed by the slmgr.vbs -ato command. If the activation is successful, no additional messages are displayed. The -ipk option installs the product key supplied in <product_key>, replacing any existing product keys. The -ato option performs operating system activation.

Instead of using PowerShell, Server Core and a server with a GUI can be managed via command-line commands.

The commands shown in the following tables are the most commonly used commands for specific task groups.

Configuration and installation commands are displayed in the following table:

Task Command
Set the local administrative password net user administrator *
Join a computer to a domain netdom join %computername% /domain:<domain> /userd:<domainusername> /passwordd:*
Remove a computer from a domain netdom remove <computername>
Add a user to the local administrators group net localgroup Administrators /add <domainusername>
Remove a user from the local administrators group net localgroup Administrators /delete <domainusername>
Add a user to the local computer net user <domainusername> * /add
Add a group to the local computer net localgroup <group name> /add
Change to a static IP address netsh interface ipv4 set address name <ID from interface list> source=static address=<preferred IP address> gateway=<gateway address>
Set a static DNS address netsh interface ipv4 add dnsserver name=<name or ID of the network interface card> address=<IP address of the primary DNS server> index=1 
Enter a product key slmgr.vbs –ipk <product key>
Activate the server slmgr.vbs -ato

 

Frequent commands used to display and configure networking, addressing, and IPSEC configuration are listed in the next table:

Task Command
Display or modify IPSEC configuration netsh ipsec
Display or modify IP to physical address translation arp
Display or configure the local routing table route
View or configure DNS server settings nslookup
Display protocol statistics and current TCP/IP network connections netstat
Display protocol statistics and current TCP/IP connections using NetBIOS over TCP/IP (NBT) nbtstat
Display hops for network connections pathping
Trace hops for network connections tracert

A table of useful and frequently used commands to manage services and processes can be found here:

Task Command
List the running services sc query or net start
Start a service sc start <service name> or net start <service name>
Stop a service sc stop <service name> or net stop <service name>
Retrieve a list of running applications and associated processes tasklist
Start Task Manager taskmgr

 

Essential disk and file system commands are listed in the next table:

Task Command
Manage disk partitions diskpart
Manage volume mount points mountvol
Defragment a volume defrag
Convert a volume to the NTFS file system convert <volume letter> /FS:NTFS
Compact a file compact
Take ownership of a file or folder icacls

 

Windows Server Core and a server with a GUI can be managed using the Server Configuration Tool by typing in the sconfig.cmd command. The following screen shows the Server Configuration menu after executing the sconfig.cmd command:

The Server Configuration Tool allows you to perform initial server configuration, such as setting the IP address of a network adapter and information about DNS servers, setting the date and time, activating Windows, and enabling a remote desktop or configuring remote management. Additionally, it allows you to join a server to a workgroup or a domain, change a computer's name, add local administrators, configure Windows update settings, and manage telemetry settings.

The purpose of the Server Configuration Tool is to provide a quick way to configure a server. Following this, a server will be managed using Server Manager, PowerShell remoting, or other scripting and remote management tools that offer more complex management functionality. It is also handy for administrators who are not well versed in Windows PowerShell.

The Server Configuration Tool should not replace knowledge of Windows PowerShell. Windows PowerShell is a standard for task automation and configuration management and might be heavily tested, not only in exams in the Microsoft Certified Solutions Associate: Windows Server 2016 track, but also in all exams in the Microsoft Certified Professional program.

Another common way to manage servers is to use the Server Manager. This is a management console that enables centralized management of both local and remote servers in a secure and a convenient way, without the need to configure Remote Desktop Protocol (RDP) ports. The Server Manager is already a functional part of Windows Server 2016. To be able to manage current and older server versions, certain software components are required. The following table shows Windows Server operating systems prior to Windows Server 2016 and corresponding software components that are required to be able to manage them through Server Manager:

Operating system Required software components
Windows Server 2012 R2 or Windows Server 2012
  • .NET Framework 4.6
  • Windows Management Framework 5.0
Windows Server 2008 R2
  • .NET Framework 4.5
  • Windows Management Framework 4.0
Windows Server 2008
  • .NET Framework 4
  • Windows Management Framework 3.0

 

Server Manager is also a part of RSAT for Windows 10. The Windows Server operating system RSAT, supports depends on a server operating system the RSAT is installed on. Consult the following table to find out which version of Server Manager is compatible with which operating system:

Target operating system
Source operating system of the Server Manager that RSAT is installed on Windows Server 2016 Windows Server 2012 R2 Windows Server 2012
Windows 10 or Windows Server 2016 Compatible Compatible Compatible
Windows 8.1 or Windows Server 2012 R2 Not Compatible Compatible Compatible
Windows 8 or Windows Server 2012 Not Compatible Not Compatible Compatible

To be able to manage remote servers using the Server Manager, you first need to add them to the list of managed servers. Under the Manage menu, select Add Servers:

An Add Servers window will open. The left part of the window contains three tabs that will help you add new servers. If the computers you want to add to the list are members of a domain, choose the corresponding domain under Location to search for them. The Operating System option allows you to narrow the search to a particular operating system version, while Name (CN) allows you to enter a name or part of a name to filter the search even further:

Clicking Find Now performs the search and the results pane will show the results. Selecting one or more computers and clicking on the arrow between the panes puts selected servers on a list of servers that will be added to the Server Manager:

Once the servers are on the All Servers list, you can see basic information about them, including server name, IPv4 address, manageability status, time and date of the last update refresh, and activation information. Right-clicking on a server shows you the context menu available for that server. Configuring and managing multiple servers, as well as Server Core installations, is much easier from a centralized location. You can carry out several different actions, including monitoring server performance, establishing a remote desktop connection, rebooting a server, or starting the Add Roles and Features Wizard.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.218.163.28