Scripting Blog

A place to learn about PowerShell and share stories of automation

Use PowerShell to Query AD DS and Not Use LDAP Dialect

Summary: Learn how to use the Filter parameter and the Windows PowerShell Expression Language on the Active Directory module cmdlets.  Hey, Scripting Guy! I do not know why you like ADSI so much. The syntax is obscure, and it makes things hard to read. Yesterday’s blog that used Get-ADComputer could have been so much better if you ...

Use PowerShell to Query AD DS for Servers and then Find Hotfixes

Summary: Microsoft Scripting Guy, Ed Wilson, talks about querying the AD DS module via PowerShell and using the results to find hotfixes.  Hey, Scripting Guy!  We have a server running Windows Server 2008 R2 that is acting as one of our domain controllers. I do not have access to install the Remote Server Administration ...

The Ins and Outs of Using DSQuery with Windows PowerShell

Summary: Microsoft Scripting Guy, Ed Wilson, talks about using DSQuery to return results for use in Windows PowerShell.  Hey, Scripting Guy!  I like using the DSQuery tool to search Active Directory Domain Services (AD DS). Can I use that tool with Windows PowerShell? —WS  Hello WS, Microsoft Scripting Guy, Ed Wilson, is ...

Search AD for Missing Email Addresses Using PowerShell

Summary: Learn how to use Windows PowerShell and the Active Directory cmdlets to find and replace missing email addresses.   Hey, Scripting Guy! I am hoping you can help me. We recently decommissioned a domain and moved all the users from that domain into an organizational unit (OU) under our corporate domain. This has simplified ...

Search Active Directory for User and Office Locations

Summary: Search Active Directory for user and office locations by using Windows PowerShell and no scripting.   Hey, Scripting Guy! I am looking for an easy way to search Active Directory. For example, I need to find information out about users. We are moving offices in our city, and I need to find users who are in specific offices in ...