Wednesday, July 3, 2013

Some scripts

Scripts to check number of users under different CN & OU

dsget group "CN=ctxapp,OU=Production,OU=SDS,OU=Groups,OU=Citrix,DC=abc, DC=xyz, DC=123" -members > File name .csv

Scripts to check disable user on AD

dsquery user -name "user name" | dsmod user -disabled yes

Run these on command prompt

Monday, July 1, 2013

The general steps to migrate from Windows Server 2000 to Windows Server

Scenario:




Old server: Windows Server 2000 box

New server: Windows Server 2008 box



1. Verify that Windows 2000 SP4 have been installed on the old server and

Windows Server 2008 SP1 have been installed on the new server



Note: the domain functional level should be in Windows 2000 native mode for

the Windows 2000 domain.



2. Upgrade the Windows 2000 forest schema by running "adprep /forestprep"

command on old server



Note: you can copy the adprep folder from the Windows Server 2008

installation disc to the old server to run "adprep /forestprep".

The location is \source\adprep on the installation disc.



3. Upgrade the Windows 2000 domain schema by running "adprep /domainprep"

command on old server



4. Verify the new server's TCP/IP configuration has been pointed to

existing DNS server.



5. Add new server to existing Windows 2000 domain as a member server.



6. Run dcpromo on new server to promote it as an additional domain

controller in existing Windows 2000 domain, afterwards you may verify the

installation of Active Directory.



7. Enable Global Catalog on new server and manually Check Replication

Topology and afterwards manually trigger replication to synchronize Active

Directory database between 2 replica.



8. Disable Global Catalog on old server.



9. Use NTDSUTIL utility to transfer all the 5 FSMO roles from old server to

new server. You'd better transfer FSMO roles via GUI method instead of

using NTDSUTIL.



10. Install DNS component on new server and configure it as a new DNS

Server(Active Directory Integrated-Zone is preferred)



Note: all the DNS configuration need to be transferred from the existing

DNS Server.



11. Migrate DHCP service from Windows Server 2000 to Windows Server 2008



Please refer to:

How to move a DHCP database from a computer that is running Windows NT

Server 4.0, Windows 2000, or Windows Server 2003 to a computer that is

running Windows Server 2003

http://support.micro....aspx/kb/325473

(This should work on Windows Server 2008)



12. Migrate File Sharing service from



You can also use robocopy.exe from the Windows Server Resource kit to copy

the files and maintain NTFS permissions.



For the shares, the shares definitions and permissions are stored in the

following registry key on the server:



HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Servic es\lanmanserver\Shares



If you export out the whole key and import in the new server, and if you

have the files and folders in the same path as in the old server, then you

will retain all you shares and share permissions.



12. It's better to make the old DC offline for several days and check

whether everything works normally with the new server online. If so, you

may let the old DC online and run DCPROMO to demote it.



For more information, please refer to:



Identifying Your Windows Server 2008 Functional Level Upgrade

http://technet2.micr....03a77-d9ba-4a2

6-b756-eba5499f15581033.mspx?mfr=true



How To Install and Configure DNS Server in Windows Server 2003

http://support.micro...b/814591/EN-US/



How To Convert DNS Primary Server to Active Directory Integrated

http://support.microsoft.com/kb/816101