Category Archives: PowerShell

[ERROR] Could not find the Exchange Mailbox Administrators Universal Security Group through its well-known GUID

I came across a weird error the other day while running Exchange Server 2013 CU6 setup with the /PrepareAD switch.  The error (from the Exchange setup logs) was this: [12/02/2014 01:14:16.0727] [2] [ERROR] Could not find the Exchange Mailbox Administrators Universal Security Group through its well-known GUID 29a962c2-91d6-4ab7-9e06-8728f8f842ea.  Please make sure that Setup /prepareAD has… Read More »

How old is my Active Directory Forest?

It’s sometimes interesting to know how old your AD forest is and when the various domains were created.  I recently came across a really useful TechNet Blog with a Powershell snippet to do just this.  My version shown below just has some slightly different formatting. # How old is the forest? Get-ADObject -SearchBase (Get-ADForest).PartitionsContainer `… Read More »

Find Windows XP machines in your AD Domain

If you haven’t heard that extended support for Windows XP ended earlier this year you’ve clearly been in a coma.  There are a number of well-publicised methods for finding out whether you still have XP machines in your environment.  Here is my own humble (and spectacularly over engineered) Powershell offering.   ######################################################### # # Name:… Read More »

Powershell function to count files using Robocopy

Reading the post title you maybe wondering whether I’ve taken leave of my senses.  Why call Robocopy from Powershell to count files when Powershell has a perfectly good method of doing this natively? For example, (Get-ChildItem e:\powershell -Recurse -force | ?{! $_.PSIsContainer} | Measure-Object).count Well, the problem comes in when an individual file length exceeds 260… Read More »

Enable Strict Replication Consistency for new DCs using Powershell

Another short blog posting (brevity is obviously my thing for 2014). I occasionally come across environments in which Strict Replication Consistency is not enabled.  This is invariably because these environment have forests that were created with Windows 2000 server, but which have subsequently been upgraded.  If you need to know more about Strict Replication Consitency… Read More »