Wednesday, May 13, 2009

Command line guide for Server Core

Set Interface ID
netsh interface set interface name=”Old Name” newname=”New Name”
Set IP
netsh interface ipv4 set address name=”” source=static address= mask= gateway=
netsh interface ipv4 add dnsserver name=”” address= index=1
netsh interface ipv4 add dnsserver name=”ExtraNet” address= index=1

Set Proxy
netsh winhttp set proxy proxy-server=”http=myproxy;https=sproxy:88″ bypass-list=”*”
Set Computer Name
# Use hostname from the command prompt to get current name
netdom renamecomputer %COMPUTERNAME% /NewName:CompName /force /reboot
Change the name of a domain-joined computer
Netdom renamecomputer %OMPUTERNAME% /NewName:CompName /userd:domain\user /passwordd:*
Join Domain
netdom join %COMPUTERNAME% /domain: /userd: /passwordd:*
Set the Default scripting engine to cscript
cscript //H:Cscript
To Activate via KMS server
slmgr -ipk YQGMW-MPWTJ-34KDK-48M3W-X4Q6V
slmgr -skms :1688
slmgr -ato
slmgr -ato # Yes twice

Running Windows Update
Disable Firewall
netsh advfirewall set allprofiles state off
Allow Remote Desktop
netsh advfirewall firewall set rule group=”remote desktop” new enable=yes
Allow Remote Administration
netsh advfirewall firewall set rule group=”Remote Administration” new enable=yes
Allow Remote Firewall Administration
netsh advfirewall firewall set rule group=”Windows Firewall Remote Management” new enable=yes
Allow Ping
netsh firewall set icmpsetting 8
Connect to remote Server Core w/ out domain (this is done on management box)
cmdkey /add: /user: /pass:
Export Security Policy
secedit /export /db secedit.sbd /cfg
Import Security Policy
secedit /configure /db secedit.sdb /cfg sctest.inf /overwrite
Allow Remote Disk Management
THIS HAS to be done on BOTH SIDES!!!
netsh advfirewall firewall set rule group=”Remote Volume Management” new enable=yes
Allow Remote Device Mgr
1. On a Windows Vista or full Server installation, start the Group Policy Object MMC snap-in
2. Connect to the Server Core installation
3. Navigate to Computer Configuration\Administrative Templates\Device Installation
4. Enable “Allow remote access to the PnP interface”
5. Restart the Server Core installation
Things to Note:
- Firewall rules will have to be re-adjusted after Domain Join
Good Links for more info
Server Core Installation Option of Windows Server 2008 Step-By-Step Guide:
Windows Server 2008 Network Shell (Netsh) Technical Reference:
-Volume Activation 2.0 Deployment Guide
NOTE: I am not crazy… these Product keys are public record. They simply tell the host to require a KMS server to activate.

Product SKUs for Volume Licensing
Operating System Edition || Product Key
Windows Vista Business || YFKBB-PQJJV-G996G-VWGXY-2V3X8
Windows Vista Business N || HMBQG-8H2RH-C77VX-27R82-VMQBT
Windows Vista Enterprise || VKK3X-68KWM-X2YGT-QR4M6-4BWMV
Windows Vista Enterprise N || VTC42-BM838-43QHV-84HX6-XJXKV
Windows Server 2008 Datacenter || 7M67G-PC374-GR742-YH8V4-TCBY3
Windows Server 2008 Datacenter without Hyper-V || 22XQ2-VRXRG-P8D42-K34TD-G3QQC
Windows Server 2008 for Itanium-Based Systems || 4DWFP-JF3DJ-B7DTH-78FJB-PDRHK
Windows Server 2008 Enterprise || YQGMW-MPWTJ-34KDK-48M3W-X4Q6V
Windows Server 2008 Enterprise without Hyper-V || 39BXF-X8Q23-P2WWT-38T2F-G3FPG
Windows Server 2008 Standard || TM24T-X9RMF-VWXK6-X8JC9-BFGM2
Windows Server 2008 Standard without Hyper-V || W7VD6-7JFBR-RX26B-YKQ3Y-6FFFJ
Windows Web Server 2008 || WYR28-R7TFJ-3X2YQ-YCY4H-M249D
More from Mr Jay Closky

More DNS settings via Registry
NOTE: use regedit.exe or reg.exe to configure
The primary DNS suffix is stored in the registry in the following location:
You might want to change the values for the following registry keys:
Domain (REG_SZ)
This value contains the DNS Suffix for the Network Connection on your Server Core box. Changing it will immediately change your DNS Suffix.
SearchList (REG_SZ)
This value contains the DNS Suffix search order list. You can add DNS Suffixes here to use when searching other servers.
NetBIOS over TCP/IP:
In Server Core installations of Windows Server 2008 NetBIOS? over TCP/IP (NetBT? is enabled by default when you configure IPv4 manually. You can disable it by editing the registry. The NetBIOS over TCP/IP setting is stored in the following location:
Underneath this location you’ll find a registry key (depicted as a folder) starting with tcpip_ followed by a GUID for every network connection. Find the network connection for which you want to disable NetBIOS over TCP/IP. (NetBT) In the value you’d find a REG_DWORD value named NetBiosOptions?. This value would have a value of 2. (enabled)
To disable NetBIOS over TCP/IP change the value to 0. (disabled)
On a full installation of Windows Server 2008 there are a few options for DNS registration on the DNS tab of the advanced properties of the IP version4 configuration of a Network Connection.
In Server Core you can achieve these settings as well, but only when you set the DNS Server. (fortunately you can set it as many times as you like) Also, you have to specify DNS Suffixes first. When you set the DNS Server you can optionally use the register= switch at the end of the command. The three switch options are none, primary and both.
Specifying Register=None would result in your Server Core box not registering its DNS name with any of its DNS suffixes. This effectively disables Dynamic DNS Registration.
With Register=Primary your Server Core installation will register its hostname together with its primary DNS suffix with the DNS Server you set.
When you tell your Server Core box to Register=Both it will register its hostname with its primary DNS suffix and the connection specific DNS suffix with the DNS Server you set.
Also take a look at

No comments:

Post a Comment