Saturday, April 29, 2023

How to Remove an orphaned Windows Domain

I recently had to remove a Domain Controller and a Child Domain from a Windows Forest because it was no longer needed by my client. I tried using the Server Manager GUI and kept running into errors after errors. So, I turned my focus to ntdsutil which I have used many, many times in the past to solve this type of issues with orphaned DC's.

First, you must remove the orphaned DC's and then you can remove the orphaned Domain.

Process: Locate the DC that has the Domain Naming Master role you can do this by typing

netdom query fsmo and use that server to run the ntdsutil and metadata cleanup commands. 

How to remove DC's manually

  1. Type ntdsutil

  2. Type metadata cleanup

  3. Type connections

  4. Type connect to server "servername" This is the name of the domain controller that holds the Domain Naming Master FSMO Role.

  5. Type quit and then you are in the Metadata Cleanup menu

  6. Type select operation target

  7. Type list sites. Which displays a list of sites in the forest and each site has a number associated with it.

  8. Type select site "number". Important - Make sure you select the number of the domain to be removed

  9. Type list domains in site, and then press Enter. A list of domains in the site is displayed, each with an associated number.

  10. Type select domain "number". Select the number associated with the domain to be removed.

  11. Type list servers for domain in site. A list of domain controllers in the domain is displayed  and each DC has an associated number.

  12. Type select server "number".  Select the number that is associated with the domain controller to be removed.

  13. Type quit. The Metadata Cleanup menu is then displayed.

  14. Type remove selected server.You should now receive the confirmation that the removal of the DC that you selected to be removed was successful.

  15. Type quit at each menu

Repeat the steps above for any remaining or orphaned DC's of the child domain to be removed.

How to remove a Domain manually

    1. Type ntdsutil

    2. Type metadata cleanup

    3. Type connections

    4. Type connect to server "servername", This is the name of the domain controller that holds the Domain Naming Master FSMO Role.

    5. Type quit. The Metadata Cleanup menu is then displayed.

    6. Type select operation target.

    7. Type list domains. A list of domains in then displayed that belong to the forest, each has an associated number.

    8. Type select domain "number".  Important - Select the umber of the domain to be removed.

    9. Type quit. The Metadata Cleanup menu is then displayed.

    10. Type remove selected domain.You will receive confirmation that the removal was successful.

    11. Type quit

    Open the Active Directory Sites and Services and remove the domain controllers of the domain to be removed from their site, manually.
  1. Open Active Directory Domains and Trusts and remove any trust relationships if applicable to the domain that you deleted.

  2. Remove all entries in DNS related to the domain that you removed, also remove any SRV records.

    Check for any other reminiscences of the DC's and Domain that you removed in DNS, Active Directory Sites and Services, etc.

Wednesday, April 19, 2023

How to Add UPN suffix in Microsoft Active Directory

How to Add UPN suffix in Microsoft Active Directory?

First, what is a UPN?

The User Principal Name (UPN) suffix is part of the logon name in Active Directory. When you create a logon account, by default it will use the DNS name of your AD domain. Example: Your local domain name phmservices.local. The user that you want to create is WMays therefore, the username would be wmays@phmservices.local. 

However, what if you want it to be something else like wmays@phmservices.com? You can add an alternate UPN or second UPN.

What are some reasons that you might need a second UPN for?

  • A future implementation of Office 365
  • The internal domain is a domainname.local and you want users to sign in with the domain.com suffix
  • New software or a software upgrade that requires the users UPN to match the user’s email address

 How to Add the second UPN?

Open Active Directory Domains and Trusts, right-click Active Directory Domains and Trusts, and then choose Properties.

On the UPN Suffixes tab, in the Alternative UPN Suffixes tab, type the new UPN suffix you want, and then select Add, then click OK.

Note: You can also use powershell  

Friday, March 10, 2023

Exchange Server Defrag

Note: Some of these commands can be quite lengthy and therefore, will vary in the time to complete.

After any of the steps if the database shows as "Clean" when you check the status with the /mh command, then you can try to mount the DB again. If the DB is shows as "Dirty Shutdown" then keep going with the steps below.

1. Eseutil /mh database file path   - this checks the status of the DB

If the output shows "Dirty Shutdown" then you need to repair it- see below 

Example: eseutil /mh D:\Program Files\Exchange Server\Databases\Mailbox1\Mailbox1.edb

2. Soft Recovery: Eseutil /r d:\Program Files\Exchange Server\Databases\Mailbox1\Mailbox1.edb - note this only works if minimal corruption. Then run this again to check the status  --   eseutil /mh D:\Program Files\Exchange Server\Databases\Mailbox1\Mailbox1.edb

3.If the above did not work then proceed to Hard Recovery: Eseutil /p D:\Program Files\Exchange Server\Databases\Mailbox1\Mailbox1.edb

after it completes run status again Eseutil /mh D:\Program Files\Exchange Server\Databases\Mailbox1\Mailbox1.edb

 4. Also a defrag may be needed if so Eseutil /d

You should run this command with a temp location so you don't run out of room. Designate a temp location that hes enough space to acommdata the database temp file. 

Example: Eseutil /d D:\Program Files\Exchange Server\Databases\Mailbox1\Mailbox1.edb /t e:\Temp\Temp1.edb

Note: To be safe the temp file should be two times the amount of the size of the database. In other words if the DB is 100GB it is best to have the temp file go to a location that has 200GB available. Otherwise, the command will not complete because it does not have enough space to work and complete the task.

Thursday, February 25, 2021

Dell PowerEdge and VMware Compatibility Matrix

Dell PowerEdge Systems VMware compatibility Matrix

 https://www.dell.com/support/kbdoc/en-us/000178967/dell-poweredge-systems-vmware-compatibility-matrix

VMware Compatibility Matrix

 VMware Compatibility Matrix

https://www.vmware.com/resources/compatibility/search.php