Tuesday, February 4, 2014

Set network configurations from the command line in Windows

Lets use the following criteria:

We will be setting up Local Are Connection

    IP        : 172.168.100.2
    MASK    : 255.255.255.0
    GW        : 172.168.100.1
    GW Metric    : 1

Here is the syntax for IPv4:

netsh interface show config
netsh interface ip set address name="Local Area Connection" static 172.168.100.2 255.255.255.0 172.168.100.1 gwmetric=1

Check for duplicate Security Identifiers (SID) on your domain

Open a command prompt and type

C:\ ntdsutil

 and press ENTER.

Now type

C:\ security account management

and press ENTER.

Now type

C:\ connect to server DNSNameOfSAMDatabaseServer

 and press ENTER.

Now type

C:\ check duplicate sid

and then press ENTER.

If you have duplicates it will be listed.