Windows Tutorials
Friday, July 27, 2012
Saturday, April 3, 2010
restore Active Directory
A. You can’t restore Active Directory (AD) to a domain controller (DC) while the Directory Service (DS) is running. To restore AD, perform the following steps.
- Reboot the computer.
- At the boot menu, select Windows 2003 Server. Don’t press Enter. Instead, press F8 for advanced options. You’ll see the following text.
- Scroll down, and select Directory Services Restore Mode (Windows NT domain controllers only).
- Press Enter.
- When you return to the Windows 2000 Server boot menu, press Enter. At the bottom of the screen, you’ll see in red text Directory Services Restore Mode (Windows NT domain controllers only).
OS Loader V5.0
Windows NT Advanced Options Menu
Please select an option:
Safe Mode
Safe Mode with Networking
Safe Mode with Command Prompt
Enable Boot Logging
Enable VGA Mode
Last Known Good Configuration
Directory Services Restore Mode (Windows NT domain controllers only)
Debugging Mode
Use | and | to move the highlight to your choice.
Press Enter to choose.
The computer will boot into a special safe mode and won’t start the DS. Be aware that during this time the machine won’t act as a DC and won’t perform functions such as authentication.
- Start NT Backup.
- Select the Restore tab.
- Select the backup media, and select System State.
- Click Start Restore.
- Click OK in the confirmation dialog box.
After you restore the backup, reboot the computer and start in normal mode to use the restored information. The computer might hang after the restore completes; I’ve experienced a 30-minute wait on some machines.
Backup Windows Server 2003 Active Directory
Method #1: Using NTBACKUP
- Open NTBACKUP by either going to Run, then NTBACKUP and pressing Enter or by going to Start -> Accessories -> System Tools.
- If you are prompted by the Backup or Restore Wizard, I suggest you un-check the "Always Start in Wizard Mode" checkbox, and click on the Advanced Mode link.
- Inside NTBACKUP's main window, click on the Backup tab.
- Click to select the System State checkbox. Note you cannot manually select components of the System State backup. It's all or nothing.
- Enter a backup path for the BKF file. If you're using a tape device, make sure NTBACKUP is aware and properly configured to use it.
- Press Start Backup.
- The Backup Job Information pops out, allowing you to configure a scheduled backup job and other settings. For the System State backup, do not change any of the other settings except the schedule, if so desired. When done, press Start Backup.
- After a few moments of configuration tasks, NTBACKUP will begin the backup job.
- When the backup is complete, review the output and close NTBACKUP.
Next, you need to properly label and secure the backup file/tape and if possible, store a copy of it on a remote and secure location.
Method #2: Using the Command Prompt
You can use the command line version of NTBACKUP in order to perform backups from the Command Prompt.
For example, to create a backup job named "System State Backup Job" that backs up the System State data to the file D:\system_state_backup.bkf, type:
Friday, April 2, 2010
DHCP Database in Windows Server 2003
DHCP - Display Statistics
Bizarrely, I find 'Display Statistics' the most difficult tab to find on the DHCP server. This is because it's the first item on the menu, and is often masked by the very highlight that should attract me. I just hope that you are not afflicted by this blind spot. In any event, Display Statistics is one of the most interesting and rewarding items on the DHCP menu.
Display Statistics is available at both the server and the scope level. My first thought is, 'How many leases are left?' Next, I look to see if there have been any NACKS or lease declines. See the screen shot to find the Display Statistics... menu.
DHCP Database
DHCP has its own database. Stored in this DHCP.mdb are the addresses, scopes and leases of the clients. Understanding this database will help you backing up and restore a DHCP server.
Check out this folder: %systemroot%\system32\dhcp\dhcp.mdb
As time goes by the database will grow, and best practice dictates that you should consolidate the database by freeing up space taken up by old leases.
The procedure for compacting the dhcp.mdb database is this.
1) Stop the DHCP service. Either right click the DHCP Server icon, select All tasks then Stop. Alternatively, go to the command line and type: NET Stop DHCPServer. (For once the command really is DHCPserver, NOT DHCPyourservername.)
2) At the command line, navigate to: %systemroot%\system32\dhcp\dhcp.mdb.
3) Jetpack dhcp.mdb temp.mdb. What this does is copies the existing database, compacts it, then copies it back to the original location - clever.
4) Remember to restart DHCP. Either use the GUI, or if you are at the command line, NET Start DHCPServer
Warning: Do not 'mess' with any of the files that you find in the %systemroot%\system32\dhcp folder, if you do, then DHCP will stop working and you will either have to restore, or else re-install DHCP.
Backing up the DHCP Database
The first surprise is that this dhcp.mdb database is backed up every hour.
The second surprise is that the old jetpack database engine controls the database.
The third surprise is that you can only automatically backup to a local folder. Should you need a 'real' backup, then just backup the files in the %systemroot%\system32\dhcp\Backup\ directory.
Finally, and unsurprisingly, there is a GUI to backup the DHCP database.
Reconcile
Reconcile is a technical term for making sure that DHCP information is consistent. What can happen is that when you restore a database, there is a miss-match between lease information in the database and the same information in the DHCP server's registry. Specifically, the registry just stores basic or summary information, the detailed information from a recent restore maybe different, so a 'Reconcile' will ensure that the database and registry data are consistent once more.
Bear in mind that you can either reconcile individual scopes or choose all scopes. It all depends on the 'focus' of what you select. If you select an individual scope that that is the limit of what you can reconcile, however, when you select the server icon, you can: Reconcile All Scopes - see diagram above. (not below)
DHCP Audit Log 
Once you setup DHCP auditing, you get a separate log for each day of the week. The logs are a wealth of information, not just about the health of the server, but also which machine gets which IP address for how long.
To setup Auditing, right click the DHCP server, then select properties.
Auditing removes the last reason for having static IP addresses, accountability. Die-hards, Luddites who resist DHCP often justify static IP addresses on the grounds that you can always account for which machine had which IP address on a particular day. With DHCP Auditing you can achieve the same result and have all the benefits of central administration, instant control over default gateways and a raft of other options.
Thursday, March 25, 2010
Event ID 4007
roubleshoot AD DS and restart the DNS Server service
The DNS Server service relies on Active Directory Domain Services (AD DS) to store and retrieve information for AD DS-integrated zones. This error indicates that AD DS is not responding to requests from the DNS Server service. Ensure that AD DS is functioning properly, troubleshoot any problems, and then restart the DNS Server service.
For information about troubleshooting AD DS, see Active Directory Troubleshooting Topics (http://go.microsoft.com/fwlink/?LinkId=95789).
To perform this procedure, you must have membership in Administrators, or you must have been delegated the appropriate authority.
To restart the DNS Server service:
- On the DNS server, start Server Manager. To start Server Manager, click Start, click Administrative Tools, and then click Server Manager.
- In the console tree, expand Roles, expand DNS Server, and then expand DNS.
- Right-click the DNS server, click All Tasks, and then click Restart.
If the problem continues, restart the computer and then use Server Manager to confirm that the DNS Server service has started.
To restart the computer:
- Click Start, click the arrow next to the Lock button, and then click Restart.
To confirm that the DNS Server service has started:
- On the DNS server, start Server Manager.
- In the console tree, expand Roles, and then click DNS Server.
The System Services list shows the state of the DNS Server service