I was chatting with my friend Gladys Kravitz recently about some PowerShell scripting she was doing with Active Directory and the DirectorySearcher object. For a number of reasons, the Active Directory module from Remote Server Administration Tools (RSAT) is not an option. But that’s fine. Gladys is an experience AD admin and PowerShell scripter. Still,…
Category: Active Directory
Managing Raw DirectorySearcher Data
Recently, I was chatting with my friend Gladys. As part of her work, she often creates Active Directory PowerShell-related tools for her colleagues. It is always good to be the toolmaker! Anyway, she doesn’t want to rely on the Active Directory module from Remote Server Administration Tools (RSAT). There’s no guarantee that the feature can…
Friday Fun – Custom Grouping with PowerShell
The other day I was answering a question in the PowerShell Facebook group. This person was getting data from Active Directory and trying to organize the results in a way that met his business requirements. My suggestion was to use Group-Object and a custom grouping property. I am assuming you are familiar with Group-Object. You…
Active Directory Group Reporting
I’ve pushed v1.2.0 of the ADReportingTools module to the PowerShell Gallery. The release adds the missing help for Get-ADComputerReport. I’ve also added better documentation and information in warning messages when running commands in the PowerShell ISE or VS Code. To re-iterate, the module is designed to be run from a PowerShell console host. It is…
Active Directory Reporting Tools Released
Over the weekend, I published the 1.0 version of the ADReportingTools module to the PowerShell Gallery. I first wrote about this module a few weeks ago. I’ve made a number of changes since then and felt the module was ready for an official release. I’m continuing to add new features so you’ll want to keep…
Better Active Directory Reporting with PowerShell
I’ve been using Active Directory for over 20 years. I was even one of the first 2000 IT Pros worldwide to obtain an MCSE on Windows 2000. Over the years, I’ve used a variety of management tools from command-line tools, to VBScript, and eventually PowerShell. Like many of you, I’ve used the ActiveDirectory module from…
Scaling the Active Directory Log Search with PowerShell
Recently, I posted a demonstration of how to find changes to your Active Directory using PowerShell. This process requires that you search through the Security event log on all your domain controllers. As a few people pointed out, myself included, this has the potential to not scale very well in large environments. I still believe…
Climbing Trees in PowerShell
I’m continuing with my renewed interest in Active Directory, and how I can take advantage of PowerShell. This is a topic I’ve been working with since the PowerShell v2 days. I have a lot of old code. Some of which I’ve decided to dust off and polish up. One topic that always interested me, is…
Searching Active Directory Logs with PowerShell
The last few weeks, I’ve been spending time with Active Directory and automating management tasks with PowerShell. If you go back a page or two of posts, you’ll see some of the scripts and functions I’ve shared. Today, I want to address something that has come up in recent comments related to tracking changes in…
Building a PowerShell Tool for Active Directory Changes
A few days ago, I posted a PowerShell script I wrote that creates a formatted HTML report, complete with collapsible regions, which shows recent changes to objects in your Active Directory domain. Including objects that have been deleted, assuming you enabled the Active Directory RecycleBin feature. I am pleased with the result and many of…
An Active Directory Change Report from PowerShell
A few days ago I posted some PowerShell code that you could use to be alerted when things changed in Active Directory. The code used PowerShell and CIM events to notify you, for example, when a new user account is created. This can be helpful when you need alerting. But perhaps you only need reporting….
Building an Active Directory Watcher with CIM and PowerShell
Last week, Adam Bertram sent out a tweet looking for any PowerShell code to notify the user when a new Active Directory user account had been created. I dug out some very, very old code that used a WMI event subscription to watch Active Directory for such an event. The code I shared was something…
Get Group Policy Links with PowerShell
I was chatting with my friend Gladys Kravitz about Group Policy reporting stuff recently,. and the discussion led me to dust off some old code I had for getting Group Policy links using PowerShell. The GroupPolicy module has a Set-GPLink command, but nothing that easily shows you what GPOs are linked to your site, domain…
Distinguished Parsing with PowerShell and Regex
The other day I’m chatting with my friend Gladys Kravitz about Active Directory and she makes an off-hand remark about parsing out organizational unit names from a distinguished name. On one hand, this is a pretty simple task, assuming a proper distinguished name from the Active Directory cmdlets. All you really need to do is…
Active Directory Objects and the PowerShell Pipeline
This article is something I’ve been meaning to write for sometime. As often as I tell people PowerShell is easy to use once you understand its core concepts, that isn’t always the case. This is a problem my friend Gladys Kravitz brought to my attention some time ago. Like her, you probably have written a…