Windows Tips & Tricks UPDATE, December 15, 2003, —brought to you by the Windows & .NET Magazine Network and the Windows 2000 FAQ site
This Issue Sponsored By
- Q. How can I rename a Windows Server 2003 domain controller (DC)?
- Q. How can I install NetBEUI in Windows Server 2003?
- Q. How can I keep certain subfolders in a directory but remove all other subfolders?
- Q. Does Windows support Serial ATA (SATA) drives?
- Q. What actions occur when I click Repair on a network connection in Windows XP and later?
- Announcing a New eBook: Content Security in the Enterprise--Spam and Beyond
- Take Our Print Publications Survey!
- New--Microsoft Security Mobilization Road Show 2004!
- Receive a Free Identity Management White Paper!
5. Contact Us
- See this section for a list of ways to contact us.
Sponsor: Argent Software
NETWORK TESTING LABS COMPARES MOM TO THE ARGENT GUARDIAN
Network Testing Labs, one of the world's leading independent research companies, put together a comprehensive Comparison Paper on two leading enterprise monitoring solutions. Their conclusion: "The Argent Guardian easily beats out MOM in all our tests... The Argent Guardian will cost far less than MOM and yet provide significantly more functionality." Find out for yourself why organizations like Major League Baseball, GE Capital, AT&T, Harley Davidson, and Nokia all rely on The Argent Guardian for their enterprise monitoring and alerting needs. Download this Comparison Paper now:
by John Savill, FAQ Editor, [email protected]
This week, I tell you how to rename a Windows Server 2003 domain controller (DC), how to install NetBEUI in Windows 2003, and how to create a script that removes all subfolders from a directory except those that you specifically want to keep. I also tell you about support for Serial ATA (SATA) drives in Windows and what actions occur when you click Repair on a network connection in Windows XP and later.
Love Exchange! Get Fast & Easy Message Backup & Recovery—FREE Demo! Learn how Storactive LiveServ for Exchange Servers provides continuous backup and rapid, zero-loss recovery of individual messages up to entire data stores. LiveServ's disk-based backup complements existing systems to close backup windows, recover downed servers up to the point of failure (even if log files are destroyed), easily protect user mailboxes, eliminate redundancies, roll past and surgically remove viruses/corruption from your database, and keep email up and running. Click for FREE Whitepaper, Demo and Trial!
Q. How can I rename a Windows Server 2003 domain controller (DC)?
A. If the DC's domain level is set to Windows Server 2003, you can use the Netdom tool to rename the DC. Microsoft supplies Netdom as part of the Windows Support Tools, which are available from the Windows 2003 installation CD-ROM. To rename the DC using Netdom, perform the following steps:
- Start a command-prompt session.
- Add the new name to the current server (it will now have two names) by typing
netdom computername <current full computer name/IP address> /add:<new full name>For example, when I typed
netdom computername gotham.savilltech.com /add:omega.savilltech.commy computer displayed the following message:
Successfully added omega.savilltech.com as an alternate name for the computer. The command completed successfully.
- If multiple DNS servers are used, you must wait until the new name replicates to all authoritative DCs. After the new name has replicated, continue to the next step.
- Make the new name the primary name for the machine by typing
netdom computername <current full computer name/IP address> /makeprimary:<new full name>For example, when I typed
netdom computername gotham.savilltech.com /makeprimary:omega.savilltech.commy computer displayed the following message:
Successfully made omega.savilltech.com the primary name for the computer. The computer must be rebooted for this name change to take effect. Until then this computer may not be able to authenticate users and other computers, and may not be authenticated by other computers in the forest. The specified new name was removed from the list of alternate computer names. The primary computer name will be set to the specified new name after the reboot. The command completed successfully.
- Reboot the computer.
- After you reboot the machine, wait until all the domain locator records replicate to all authoritative DNS servers. After the replication is finished, check to ensure that the rename worked successfully by checking the name on the Computer Name tab of the Control Panel System applet. You can also view all computer names by typing
netdom computername <new full name> /enumerateFor example, when I typed
netdom computername omega.savilltech.com /enummy computer displayed the following:
All of the names for the computer are: omega.savilltech.com gotham.savilltech.com The command completed successfully.
- You can now remove the old name by typing
netdom computername <new full name> /remove:<old full name>For example, when I typed
netdom computername omega.savilltech.com /remove:gotham.savilltech.commy computer displayed the following:
Successfully removed gotham.savilltech.com as an alternate name for the computer. The command completed successfully.
You can enumerate the names again to show the old name has been removed.
Q. How can I install NetBEUI in Windows Server 2003?
A. Microsoft doesn't ship Windows 2003 with NetBEUI and doesn't support the protocol in the OS. However, if you require NetBEUI, you can install the version supplied on the Windows XP installation CD-ROM in the \valueadd\msft\net\netbeui subfolder. Copy the nbf.sys file into the \%systemroot%\system32\drivers directory, copy netnbf.inf into the \%systemroot%\inf\ directory, then open the network connection properties and click Install to add NetBEUI.
Q. How can I keep certain subfolders in a directory but remove all other subfolders?
A. I maintain my own documents area, and I point My Documents to this location. Many software applications automatically create their own folders in this area that I don't want to maintain. The best method I've found for deleting all folders except for the ones that I've created is to create and run the following script:
@echo off REM -- Delete everything from a folder except those subfolders listed. D: cd \Documents dir /ad /b > %temp%\folders.list REM -- Remove from the file those folders that you want to keep. findstr /x /v "Books" %temp%\folders.list > %temp%\folders1.list findstr /x /v "Fitness" %temp%\folders1.list > %temp%\folders.list findstr /x /v "Personal" %temp%\folders.list > %temp%\folders1.list findstr /x /v "SavillTech" %temp%\folders1.list > %temp%\folders.list findstr /x /v "Seminars" %temp%\folders.list > %temp%\folders1.list findstr /x /v "Technical" %temp%\folders1.list > %temp%\folders.list REM -- Delete all remaining subfolders. For /f "delims=" %%i in (%temp%\folders.list) do rmdir /s /q "%%i"
The script outputs the names of all subfolders to a file. Next, it uses Findstr to output all lines in that first file that don't match the passed text to a second file that the script uses as input on the next line. Notice that the filenames alternate between folders.list and folders1.list. The reason the filenames alternate is because if you try to use Findstr from within a file to search the file for a certain string and output the names of the subfolders to the same file, you get a blank file. Finally, the script uses the second file as input to a For loop that removes each subdirectory left in the first file. Be aware that in my example, the final file that the script creates is folders.list. However, if you want to keep an odd number of folders, your final file would be folders1.list, which you would then use instead of folders.list as the input to the For loop. Failure to specify the correct output file will remove subfolders that you didn't intend to remove.
Q. Does Windows support Serial ATA (SATA) drives?
A. SATA is a new hard disk standard that does away with the standard 40-pin IDE cable in favor of a new thin 7-pin cable. SATA uses only one cable per device to connect the drive to the controller, which eliminates the master drive and slave drive concept. The power connector is also different, although some SATA drives also provide an old-style power connector.
Out of the box, no current Windows version, including Windows Server 2003, supports SATA drives. However, just as you can add a SCSI controller to Windows, you just need to add the correct SATA driver that ships with the motherboard or SATA host adapter. After you've installed the driver, Windows will be able to see the SATA controller and any attached devices. For more information about SATA, visit the SATA Working Group Web site at http://www.serialata.org.
Q. What actions occur when I click Repair on a network connection in Windows XP and later?
A. If you right-click a network connection and select Status, Windows displays information about the connection's speed, duration of connection, and packet activity. For XP and later, a Repair option appears on the Support tab. When you click Repair, Windows attempts to resolve a range of problems. Specifically, the OS
- attempts to renew the DHCP lease, if the connection obtains its IP address through DHCP, by using a broadcast message
- flushes the Address Resolution Protocol (ARP) cache by using the command
arp -d *
- flushes the NetBIOS cache by using the command
- flushes the DNS cache by using the command
- reregisters the NetBIOS name and IP address with WINS by using the command
- reregisters the computer name and IP address with DNS by using the command
(from Windows & .NET Magazine and its partners)
This eBook explores how to reduce and eliminate the risks from Internet applications such as email, Web browsing, and Instant Messaging by limiting inappropriate use, eliminating spam, protecting corporate information assets, and ensuring that these vital resources are secure and available for authorized business purposes. Download this eBook now free!
To help us improve the hardware and software product coverage in the Windows & .NET Magazine print publications, we need your opinion about what products matter most to you and your organization. The survey takes only a few minutes to finish, so share your thoughts with us at
Join industry-guru Mark Minasi on this exciting 20-city tour and learn more about tips and best practices to secure your Windows Server 2003 and Windows 2000 networks. There is no charge for this event, but space is limited, so register today!
(brought to you by Windows & .NET Magazine)
Are your existing identity-management and access-control solutions fragmented, duplicated, and inefficient? Attend this free Web seminar and discover how to automate and simplify identity creation, administration, and access control. Leverage your investment in Microsoft technologies and benefit from greater security, improved productivity, and better manageability. Register now!
5. Contact Us
Here's how to reach us with your comments and questions:
- About the newsletter — [email protected]
- About technical questions — http://www.winnetmag.com/forums
- About product news — [email protected]
- About your subscription — [email protected]
- About sponsoring UPDATE — [email protected]
This weekly email newsletter is brought to you by Windows & .NET Magazine, the leading publication for Windows professionals who want to learn more and perform better. Subscribe today.
Receive the latest information about the Windows and .NET topics of your choice. Subscribe to our other FREE email newsletters.