I have published a new version of The PowerShell Practice Primer. If you own the book and signed up for notifications, you should have received an email informing you of the new edition. That is a great benefit of publishing on Leanpub. If I update the book, you get the update as well. In this…
Comparing PowerShell Property Names
Recently, I was chatting with my friend Gladys Kravitz about the hassle of comparing objects in PowerShell. Even after all these years. She has a specific use case, but you might also feel the need for a better comparison option. And to be clear, the comparison we’re talking about is not the object’s values, as…
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…
Friday Fun: PowerShell Weather Widget
Recently, someone on Twitter turned me on to an resource that could be used in a PowerShell session to display weather information. This is apparently a well-established and well-regarded source. Once I worked out the basics, I naturally wanted to see what else I could do it with. Here’s what I came up with. Everything…
Solving the PowerShell Memory Challenge
I hope you tried your hand at this Iron Scripter PowerShell challenge on reporting memory usage. The basic challenge was to find the total percent of working set memory that a specific process or service is using. Here’s how I approached it, with my usual disclaimer that my solution is not the only or nor…
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…
PowerShell Puzzles and Challenges
I just wrapped up presenting to the Research Triangle PowerShell User Group. I gave them a set of PowerShell problems to solve. The idea is that in solving the problem, you improve your PowerShell skills and expertise. Tonight’s problems were not scripting problems. The answers to these puzzles are not limited to one-line commands, although…
My PowerShell Word Count Solution
A few days ago I posted a quick PowerShell puzzle as part of an appearance announcement. Using the about_Splatting help file, what word is used the most frequently? If you can show the top 5 even better. Ideally, your code will treat words like “for,” and “for” as the same. For extra points, create a…
Scripting Challenge Meetup
As you probably know, I am the PowerShell problem master behind the challenges from the Iron Scripter site. Solving a PowerShell scripting challenge is a great way to test your skills and expand your knowledge. The final result is merely a means to an end. How you get there and what you had to learn…
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…
Solving the PowerShell Conversion Challenge
Today let’s look at how I approached the first Iron Scripter PowerShell challenge of the year. The goal of the challenge was to convert or translate an object into a PowerShell class definition. If you are new to these challenges, the journey to how you achieve the goal is more valuable than the end result….
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…