Category Archives: PowerShell

How to find duplicate sAMAccountNames between two forests

When preparing for a migration of AD objects from one forest to another it is useful to know if any of the names are going to conflict.  There are, as you probably know, a number of different naming attributes in AD, but the one most likely to cause problems in the event of a conflict is sAMAccountName. … Read More: How to find duplicate sAMAccountNames between two forests »

How to clear group membership with Powershell

Something I often recommend to my customers is keep the membership of the Enterprise Admins and Schema Admins groups empty and only populate them (temporarily) when required.  The privileges assigned to these groups are obviously high and removing the members reduces the potential for costly mistakes and/or compromise.  Here’s a quick Powershell snippet that will… Read More: How to clear group membership with Powershell »

How to find the renamed domain Built-In Administrator account with Powershell

Many organisations choose to rename the Built-in Administrator account for the domain for security reasons.  Whether or not renaming the account provides any real protection is the matter of some debate.  What is clear is that any hacker worth his or her salt is not going to be fooled by the rename, because the account… Read More: How to find the renamed domain Built-In Administrator account with… »

GAL Sync with Powershell

If you’re looking for a Global Address List synchronisation solution for Exchange that simply uses Powershell, look no further than this excellent script from fellow MVP Carol Wapshere. http://www.wapshere.com/missmiis/a-galsync-powershell-script The script doesn’t leverage the DirSync control (and hence doesn’t use deltas), which means that it isn’t perhaps as efficient as some of the full-blown solutions… Read More: GAL Sync with Powershell »

Bulk create sample AD users from CSV file using Powershell

Many moons ago I provided a CSV file containing 200 sample AD user accounts together with instructions on how to use CSVDE to import the accounts into AD. I often use these sample accounts in lab environments and for presentations. I thought it would be fun to write a small powershell script to read the… Read More: Bulk create sample AD users from CSV file using Powershell »

GAL Sync with Quest Quick Connect Express for Active Directory

Quest has just released a freeware product called Quick Connect Express for Active Directory. If you’re looking for something that fills the gap left by the (now pensionable) Microsoft Identity Integration Feature Pack, then this may well be it.  I’ve spent the last day looking at the product’s capabilities for running Exchange 2010 Global Address… Read More: GAL Sync with Quest Quick Connect Express for Active Directory »

Powershell script to install Windows Updates from folder

  If you’ve been working with Exchange 2010 Service Pack 1 you will know that there are several pre-requisites to download and install. Once downloaded you end up with a bunch of *.msu (Windows Update) files.  If, like me, you have to install them on several servers and don’t like the idea of having to… Read More: Powershell script to install Windows Updates from folder »

Powershell script to Copy GPO Links

I was recently involved in a task to consolidate an OU structure.  Part of this involved moving user objects from one OU to another and re-linking GPOs that were linked to the old OU to the new OU.  There were a large number of links and I didn’t fancy adding them manually, so I spent… Read More: Powershell script to Copy GPO Links »

Teched 2010 New Zealand – Powershell command dictionary file

After my Teched break-out session yesterday I was asked if I could share the PS command dictionary file that I used to support my demos.  Here it is (right-click Save Target As): CommandDictionary.psd1 For those of you that weren’t there the PS commands mostly relate to working with the AD Recycle Bin feature of Windows… Read More: Teched 2010 New Zealand – Powershell command dictionary file »