Wednesday, July 30, 2014

Server Core - Command Lines

To show the interfaces available
Type
netsh interface show interface

To set ip addresses
Type
netsh interface ipv4 set address name="Interface Name" source=static address=StaticIP 
mask=SubnetMask gateway=DefaultGateway

To disable and enable network card
Type
Netsh interface set interface “Interface Name” disabled
Netsh interface set interface “Interface Name” enabled



To change the interface name
Type
Netsh interface set interface name=”Local Area Connection” newname=”NewName


To add DNS Ip Address
Type
Netsh interface ipv4 add dnsserver name=”Local Area Connection” address=<IP address of DNS server>


Type

To show hostname

Hostname

To change hostname

netdom renamecomputer %COMPUTERNAME% /Newname "NEW-NAME"


To restart the computer

Type

Shutdown /r /t 0


To install active directory

Type

dcpromo /unattend /replicaOrNewDomain:Replica /replicaDomainDNSName:<DomainName> /ConfirmGC:Yes /UserName:<DomainName>\Adminsitrator /Password:* /safeModeAdminPassword:<AdminPassword>



To enable or disable Windows Firewall

Type

To Switch Off

netsh advfirewall set allprofiles state off

To Switch On

netsh advfirewall set allprofiles state on



To enable powershell and start powershell


Type

sconfig then select "4" then "2" after reboot is complete

Type

powershell






No comments:

Post a Comment