Windows Server 2008 from the command line
08 April 2012
If like me you like to configure your systems from the command line or automation scripts, here is a quick reminder on how to do basic setup of Windows Server 2008
Configure a network adapter
Configure the IP address
First you need to find out the index of the network adapter you want to assign the address to. To do so, run the following command:
netsh interface ipv4 show interface
Then run the following command to configure the adapter.
netsh interface ipv4 set address name="<idx>" source=static address=xxx.xxx.xxx.xxx mask=255.255.255.0 gateway=yyy.yyy.yyy.yyy
Configuring the DNS
netsh interface ipv4 add dnsserver name="<idx>" address=xxx.xxx.xxx.xxx index=1
Configure remote administration
Enabling remote administration
reg add "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Terminal Server" /v fDenyTSConnections /t REG_DWORD /d 0 /f
Enabling the firewall rule for remote access
netsh advfirewall set currentprofile settings remotemanagement enable
Useful sites
- http://www.windowstipspage.com/2010/11/remote-desktop-terminal-services-how-to.html
- http://www.petri.co.il/configuring-windows-server-2008-networking-settings.htm
- http://www.petri.co.il/remotely-managing-windows-2008-server-core-firewall.htm
blog comments powered by Disqus