Windows 2008 ServerCore Management Experience

  

The Server Core installation option for the Microsoft Windows Server 2008 operating system is a new option for installing Windows Server 2008. The Server Core installation provides a minimal environment for running specific server roles, reducing maintenance and management requirements and reducing the attack surface of these server roles. The Explorer shell is not installed as part of the Server Core installation. Instead, the default user interface for Server Core installations is the command line. Therefore, we are performing some common management tasks, such as modifying the screen resolution and screen saver settings, not as simple as the previous operating system, we need to take a little effort to achieve it. Let's start by modifying the screen resolution.

First, modify the screen resolution

After installing Windows Server 2008 Server Core, if you want to change the screen resolution, because there is no Windows Explorer shell in Server Core, On the surface, it is not easy to know how to do it. Below we will introduce a way to modify the screen resolution.

By modifying the registry key:

1. Open the Registry Editor and navigate to the following registry key. You can see the list of installed graphics cards

HKLM\\SYSTEM\\CurrentControlSet\\Control\\Video

2. Check the GUID key value and look for the 0000 subkey under the GUID. You need to find out which actual graphics card to use.

HKLM\\SYSTEM\\CurrentControlSet\\Control\\Video\\{%your GUID here%}\\0000

Important: The active graphics card has a VolatileSettings subkey located under 0000.

3. Now that you know the graphics card you want to modify, add the following DWORD value in decimal (not hexadecimal):

HKLM\\SYSTEM\\CurrentControlSet\\Control\\Video\\ {%your Adapter's GUID here%}\\0000

DefaultSettings.XResolution = <some width in pixels>

HKLM\\SYSTEM\\CurrentControlSet\\Control\\Video\\{%your Adapter's GUID here% }\\0000

DefaultSettings.YResolution = <some height in pixels>

4. Log out and log back in.

For example (when using a machine loaded with Virtual Server, the graphics card ends with VM Additions S3 Trio32/64), you will see GUIDs (they are unpredictable, for example the same graphics card may have between these machines) Two different GUIDs. Then set it to 1024x768, using the following key values:

HKLM\\SYSTEM\\CurrentControlSet\\Control\\Video\\{%your Adapter's GUID here%}\\0000

DefaultSettings.XResolution = 1024

HKLM\\SYSTEM\\CurrentControlSet\\Control\\Video\\{%your Adapter's GUID here%}\\0000

DefaultSettings.YResolution = 768

Of course If you can also implement it with REG.EXE, if you want to implement it through the command line method. The specific command is as follows:

REG ADD HKLM\\SYSTEM\\CurrentControlSet\\Control\\Video\\{%your Adapter's GUID

here%}\\0000 /v DefaultSettings.XResolution /t REG_DWORD /d 1024

REG ADD HKLM\\SYSTEM\\CurrentControlSet\\Control\\Video\\{%your Adapter's GUID

here%}\\0000 /v DefaultSettings.YResolution /t REG_DWORD /d 768

Note: In Windows Server 2008 Hyper-V mode.







>

Second, commonly used commands

The following describes some of the commands used in Server Core:

How to change the host name of the machine in the workgroup

netdom Renamecomputer %oldcomputername% /newname:%newcomputername%

Shutdown from command line mode

shutdown -r

Shutdown from graphical mode

shutdown /i

How to add a static IP address

netsh interface ipv4 add address "Local Area Connection" 192.168.5.20 255.255.255.0

If you need to confirm that you want to assign an IP address The NIC's label, run ipconfig/all.

If you need to assign a gateway when assigning an IP address

netsh interface ipv4 add address "Local Area Connection" gateway=192.168.5.1

192.168.5.20 255.255. 255.0

Assigning a Static Primary DNS Server

netsh interface ipv4 set dnsserver "Local Area Connection" static 192.168.5.1 primary

Assigning a Static Secondary DNS Server

Netsh interface ipv4 add dnsserver "Local Area Connection" 10.0.0.3 index=2

Note: If the index is specified, in the list, the DNS server at that location will be replaced and the other servers will move down. If the previous DNS server was obtained via DHCP, the new address will replace the old list.

Deleting static DNS server entries

Netsh interface ipv4 delete dnsserver "Local Area Connection" 10.0.0.3

If you want to delete all DNS server entries, run the following Command:

Netsh interface ipv4 delete dnsserver "Local Area Connection" all

Assign a static primary WINS server

netsh interface ipv4 set wins "Local Area Connection" static 192.168. 100.3








How to judge the version of a file in Server Core

on Windows In Server 2008 Server Core, it is not easy to determine the version of a file because there is no file versioning tool in Server Core, which was included with previous operating systems.

We usually have three ways to view the version of the file:

1. View the version of the file from the explorer of the remote system.
2, use msinfo32.exe to collect this information (only valid for already loaded modules)
3, use WMIC to determine the version of the file:

wmic datafile where name='c:\\\\windows \\\\system32\\\\filename.exe'

This command will return the version of the file you specified on the command line.

You can also redirect input to a text file.

wmic datafile where name='c:\\\\windows\\\\system32\\\\filename.exe' > out.txt

This command will create a text file that contains you All information for the specified file includes version information. Please pay attention to the syntax of wmic.







Fourth, how to change the screen saver settings Server Core

How to Change Windows Server 2008 Server Core's screen saver settings. Server Core starts running Logon.scr after 10 minutes of idle time.

The registry key values ​​that affect the screen saver settings are as follows:

HKEY_CURRENT_USER\\Control Panel\\Desktop\\ScreenSaveActive

HKEY_CURRENT_USER\\Control Panel\\Desktop\\SCRNSAVE.EXE

HKEY_CURRENT_USER\\Control Panel\\Desktop\\ScreenSaverIsSecure

HKEY_CURRENT_USER\\Control Panel\\Desktop\\ScreenSaveTimeOut

Using Registry Editor, you can change the behavior of the screen saver:

Disable the screen saver and change the following key value from 1 to 0.

HKEY_CURRENT_USER\\Control Panel\\Desktop\\ScreenSaveActive

It is also easy to change the screen saver by changing the following key values:

HKEY_CURRENT_USER\\Control Panel\\Desktop\\SCRNSAVE.EXE

By default, this value reads %windir%\\System32\\Logon.scr(Windows Logos). You can change it to scrnsave.scr (empty screen) if you wish.







Copyright © Windows knowledge All Rights Reserved