Thursday, April 30, 2015

Configure Windows 2012 Server network to join domain using netsh scripting

C:\Users\Administrator>netsh interface ip show config

Configuration for interface "Ethernet0"
    DHCP enabled:                         Yes
    IP Address:                           192.168.229.134
    Subnet Prefix:                        192.168.229.0/24 (mask 255.255.255.0)
    Default Gateway:                      192.168.229.2
    Gateway Metric:                       0
    InterfaceMetric:                      10
    DNS servers configured through DHCP:  192.168.229.2
    Register with which suffix:           Primary only
    WINS servers configured through DHCP: 192.168.229.2

Configuration for interface "Loopback Pseudo-Interface 1"
    DHCP enabled:                         No
    IP Address:                           127.0.0.1
    Subnet Prefix:                        127.0.0.0/8 (mask 255.0.0.0)
    InterfaceMetric:                      50
    Statically Configured DNS Servers:    None
    Register with which suffix:           Primary only
    Statically Configured WINS Servers:   None

C:\Users\Administrator>netsh interface ipv4 set address "Ethernet0" static 192.168.229.210 255.255.255.0 192.168.229.200 1


C:\Users\Administrator>netsh interface ipv4 set dnsserver "Ethernet0" static 192.168.229.200 primary


C:\Users\Administrator>netsh interface ip show config

Configuration for interface "Ethernet0"
    DHCP enabled:                         No
    IP Address:                           192.168.229.210
    Subnet Prefix:                        192.168.229.0/24 (mask 255.255.255.0)
    Default Gateway:                      192.168.229.200
    Gateway Metric:                       1
    InterfaceMetric:                      10
    Statically Configured DNS Servers:    192.168.229.200
    Register with which suffix:           Primary only
    Statically Configured WINS Servers:   None

Configuration for interface "Loopback Pseudo-Interface 1"
    DHCP enabled:                         No
    IP Address:                           127.0.0.1
    Subnet Prefix:                        127.0.0.0/8 (mask 255.0.0.0)
    InterfaceMetric:                      50
    Statically Configured DNS Servers:    None
    Register with which suffix:           Primary only
    Statically Configured WINS Servers:   None

C:\Users\Administrator>netdom renamecomputer %computername% /newname:VMMSQL03
This operation will rename the computer WIN-7FVEEOP8PPF
to VMMSQL03.

Certain services, such as the Certificate Authority, rely on a fixed machine
name. If any services of this type are running on WIN-7FVEEOP8PPF,
then a computer name change would have an adverse impact.

Do you want to proceed (Y or N)?
y
The computer needs to be restarted in order to complete the operation.

The command completed successfully.


C:\Users\Administrator>shutdown /r /t 0

C:\Users\Administrator>netdom join VMMSQL03 /domain:dbaglobe.com /ud:dbaglobe\administrator /pd:*
Type the password associated with the domain user:

The computer needs to be restarted in order to complete the operation.

The command completed successfully.

C:\Users\Administrator>shutdown /r /t 0 /f

No comments:

Post a Comment