The below PowerShell code will get all Security Groups that are in the Domain and sort