Colin Cochrane

Colin Cochrane is a Software Developer based in Victoria, BC specializing in C#, PowerShell, Web Development and DevOps.

Moved and Upgraded

I just finished moving this blog into Azure and updating to the latest version of BlogEngine.NET.  Some of the images from older posts got lost in the migration, and I am working to restore them.

Searching Active Directory using PowerShell

I recently discovered a very convenient way to search Active Directory using the [adsisearcher] type accelerator. Here’s a simple example searching for a user based on their first and last names:

$searcher = [adsisearcher]""
$searcher.Filter = "(&(givenName=Pete)(sn=Peterson))"
$user = [adsi]($search.FindOne().Path)