Windows server 2003 and Windows XP – How to reset IP stack

Posted by aidas | Posted in Command line, Networking, Windows 2003, Windows XP | Posted on 18-05-2009

0

This post will show you the way how to reset IP stack on your Windows server 2003 or Windows XP machine. Lets say we want to reset IP stack and write log to C:\resetlog.txt file. Note that log file is not optional parameter. To perform reset open command line and type:

netsh int ip reset C:\resetlog.txt

Windows server 2003 and Windows XP – How to set service account password via command line

Posted by aidas | Posted in Command line, Windows 2003, Windows XP | Posted on 15-05-2009

0

This post will show you how to notify Windows about service account password change using command line.

Lets say we have service named “Symantec Antivirus” and it runs as local user account named “testuser” (Log On As) . For security purposes we changed password for this user to “NewPassword“. To notify “Symantec Antivirus” that password for its service account was changed open command line and type:

sc config “Symantec Antivirus” password= NewPassword

Note that there is space between equals sign and password value.

Windows server 2003 – How to set up first domain controller

Posted by aidas | Posted in Active directory, Windows 2003 | Posted on 13-05-2009

0

This post will help you to create first domain controller in your domain. Lets say we have  Windows Server 2003 named “testserver” and our task is to create first domain controller for our domain named “testdomain.lan”.

***

1 STEP – TCP/IP SETUP

***

First of all we need to asign static IP address to our future domain controller. To do it go to “Network Connections”, select Network card and open TCP/IP properties. In my example i`ll assign these values:

IP address: 10.0.0.2
Subnet mask: 255.255.255.0
Default gateway: 10.0.0.1
Preferred DNS server: 10.0.0.2

Make sure that Preferred  DNS server points to your IP address:

windows TCP/IP

***
2 STEP – DNS SERVICE SETUP
***
Next step is to configure DNS server for your future domain. For that press Start and click Run. Type appwiz.cpl and press OK. Click “Add/Remove Windows Components”.
In “Windows Components Wizard” windows select “Networking Services” and press “Details…”.
In “Networking Services” window check “Domain Name System (DNS)”  and press OK.
DNS services
Wait for DNS install to finish its work. When setup is over press Start>Programs>Administrative Tools>DNS. In DNS management right click “Forward Lookup Zones” and select “New Zone”.
Add new zone
Select “Primary Zone” as zone type and press “Next”. In “Zone name:” window type your domain name. In our example it is testdomain.lan.
Zone name
Press “Next” two times. In “Dynamic Update” section select “Allow both nonsecure and secure updates” option and press “Next”. Press “Finish” to complete new zone creation.
After you succesfully created Forward lookup zone lets create new Reverse lookup zone for you domain. For that right click on “Reverse Lookup Zones” in DNS management and select “New zone”.
Reverse Zone
In “Zone type” section leave “Primary Zone” selected and press “Next”.
In “Reverse Lookup Zone Name” window type your network ID. It is first three octets of your network IP address. In our example it will be 10.0.0
Reverse zone name
Press “Next” two times. In “Dynamic Update” section select “Allow both nonsecure and secure updates” option and press “Next”. Press “Finish” to complete new zone creation.
DNS server configuration is completed for now and we can proceed with domain controller set up.
***
3 STEP – DCPROMO
***
Last step is to run dcpromo command to setup your domain controller. Press Start>Run, type dcpromo and press OK. Press “Next” two times until you reach “Domain controller type” section. Make sure you select “Domain controller for a new domain” as you are setting up first domain controller. Press “Next”. In next window select “Domain in a new forest” option and press “Next”.
In “New Domain name” window enter your domain name as “Full DNS name for new domain”. In our example it will be testdomain.lan :
Domain name
Press “Next”. In “NetBIOS domain name” section press “Next”. In “Database and Log Folders” windows leave defaults and press “Next”. In “Shared system volume” window press “Next”. If 1 and 2 STEPS were configured correctly you`ll get similar window:
DNS diagnostic
Press “Next”. In “Permissions” section leave default “Permissions compatible only with Windows 2000 or Windows server 2003 operating systems” option unless you are planing to use legacy server systems in your domain. Press “Next”.
In “Directory Services Restore Mode Administrator password” section enter password for DSRM. This mode is needed when you want to troubleshoot active directory database problems or restoring deleted AD objects. Press “Next”.
In “Summary” screen review your domain configuration one more time and press “Next” to start Active Directory creation process.
After process is over you will get following window:
AD created
Press “Finish” and restart your server.  Note that after restart from now on you have option to login to newly created domain.
domain login
WELL DONE !!!

Windows server 2003 and Windows XP – How to delete service via command line

Posted by aidas | Posted in Command line, Windows 2003, Windows XP | Posted on 10-05-2009

0

This post will show you quick way how to ged rid of service using command line. To delete service open command line on your Windows server 2003 and type:

sc delete <service name>

Windows server 2003 – How to clear arp cache via command line

Posted by aidas | Posted in Command line, Networking, Windows 2003 | Posted on 08-05-2009

1

This post will show you how to clear arp cache on your Windows server 2003 using command line. To do it open command line and type:

netsh interface ip delete arpcache

Windows server 2003/2008 – How to delay services start

Posted by aidas | Posted in Registry, Windows 2003, Windows 2008 | Posted on 08-05-2009

0

This post will show you how to delay services start by editing registry. This is usefull when you need to delay some services start in order your server initialize various protocols in right way. This can be done by creating service dependency. To perform it open registry editor on your Windows server 2003 (Start>Run, regedit) and navigate to:

HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services

Select service you want to create dependency for and create new Multi-String value named “DependOnService”. Open newly created value and type the name of the service or services you wish to start before this service. The name of the services is exactly as it is under “services” registry key.

Windows server 2003/2008 – How to end running process via command line

Posted by aidas | Posted in Command line, Windows 2003, Windows 2008 | Posted on 07-05-2009

0

This post will show how to end running process by using command line on your Windows server 2003. First of all you need to run tasklist command to view PID number of the process you want to end. To do it type:

tasklist

To end process type:

taskkill /PID <PID number>

To end process on remote server named “Testserver” type:

taskkill /s Testserver /PID <PID number>

Note that you can always type taskkill /? for more command usage examples


Windows server 2003/2008 – How to view running processes via command line

Posted by aidas | Posted in Command line, Windows 2003, Windows 2008 | Posted on 07-05-2009

0

This post will show how to view running processes using command line on your Windows server 2003. To do it open command line and type:

tasklist /v /fi “status eq running”

To view running processes on remote server named “Testserver” type:

tasklist /s Testserver /v /fi “status eq running”

Note that you can always type tasklist /? for more command usage examples

Windows server 2003 – How to remove your server from domain

Posted by aidas | Posted in Active directory, Command line, Tools, Windows 2003 | Posted on 07-05-2009

0

This post will show you how to remove you server from domain using command line tool netdom. Lets say we want to remove server named “Testserver” from domain testdomain.com.  To do it open command line on your Windows server 2003 and type:

netdom remove /d:testdomain.com testserver /ud:testdomain.com\Admin /pd:Pa$$w0rd

Note that netdom is part of Windows server 2003 support tools. They can be found on your OS CD (Support\Tools directory) .

Windows server 2003 – How to add alternate name to your domain controller

Posted by aidas | Posted in Active directory, Command line, Tools, Windows 2003 | Posted on 07-05-2009

0

This post will show you how to use command line tool netdom and add alternate name to your domain controller running on Windows server 2003. Lets say we have domain controller named “TestDC1.testdomain.com” and we want to add alternate name “TestDC2″. To do it open command line and type:

netdom TestDC1 dc /add:TestDC2.testdomain.com

Note that netdom is part of Windows server 2003 support tools. They can be found on your OS CD (Support\Tools directory) .

Windows server 2003 – How to check remote port availability

Posted by aidas | Posted in Command line, Networking, Tools, Windows 2003 | Posted on 07-05-2009

0

This post will show you how to check if remote port is listening for incoming connections. Lets say we want to query server named “testserver” to check if TCP port 3389 (Remote desktop connection) is listening. Open command line and type:

portqry /n testserver /p TCP /e 3389

Note that portqry is part of Windows server 2003 support tools. They can be found on your OS CD (Support\Tools directory) .

Windows server 2003 – How to capture network traffic

Posted by aidas | Posted in Command line, Networking, Windows 2003 | Posted on 07-05-2009

0

If you want to capture network traffic on your Windows server 2003 this how to will show you the way to go. For this case we can use nice utility from Windows support tools netcap. When first run this tool will install Network Monitoring Driver on your server. Ok, lets say we want to monitor traffic for 15min and save all output to D:\monitoring directory. Open command line and type:

netcap /f:D:\monitoring /l:00:15:00

If you want to get rid of Network Monitoring Driver after you`ll finish traffic capture open command line and type:

netcap /remove

Note that netcap is part of Windows server 2003 support tools. They can be found on your OS CD (Support\Tools directory) .