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…
Category: PowerShell
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…
PowerShell Modules in a Cross-Version World
The other day I was helping a friend sort out some module-related questions. While helping him, I realized his questions and problems were not unique. Now that many of us are running Windows PowerShell 7 side-by-side, what are the implications when it comes to using PowerShell modules? What are the potential “gotchas”? And what can…
What the Shell is Happening?
The PowerShell community is beginning another year in the world of PowerShell 7. Most of you know what that means. However, there are newcomers to our community practically every day. Or I know there are occasional or reluctant users who might not pay enough attention to understand the world of PowerShell as it stands today….
Answering the CIM Directory Challenge
The last Iron Scripter challenge of 2020 was a big one. If you didn’t get a chance to work on it, see what you can come up with then come back to see my approach. As with many of the challenges, the goal isn’t to produce a production-ready PowerShell tool, but rather to push the…
Get Windows Terminal KeyBindings
As many of you know I am a big fan and daily user of Windows Terminal. So much so, that I wrote a PowerShell module called WTToolBox that you can install from the PowerShell Gallery. I’ve pushed a new version that does a better of getting key bindings. Windows Terminal makes use of a number…
Deploy OpenSSH to Windows Server
Yesterday I shared some PowerShell ideas for remotely setting up the server component of ssh on a remote Windows 10 system. This would allow you to establish an ssh session to the desktop or even use PowerShell remoting over ssh. Next, we need to look at doing the same thing for Windows Servers. Windows Server…
Deploy OpenSSH Server to Windows 10
PowerShell 7 offers a number of compelling reasons to adopt it. One of the best is support for SSH as a PowerShell remoting protocol. Unfortunately, this is not a topic that typically comes up for Windows-centric IT Pros. I know this is definitely true in my case, and a deficiency I have been working on….
Convert to Local Time with PowerShell
As some of you know, I host a monthly online Twitter chat on the first Friday of every month using the #PSTweetChat tag (although the January 2021 chat will be on 8 January.) We get together and chat about all things PowerShell at 1:00PM Eastern Time. The challenge for the rest of the world is…
Friday Fun – A PowerShell Christmas Prompt
Time for a new Friday Fun article. These articles use “fun” ways to teach you how to use PowerShell. The end goal may be silly, but hopefully the techniques and concepts are useful. Today I have an updated prompt function. You can customize your PowerShell prompt by creating a function called prompt and loading it…
Creating PowerShell Property Names
The last week or so I’ve been playing with a new PowerShell project from Dave Carroll for using Twitter from a PowerShell prompt. The module is called BluebirdPS and you can install it from the PowerShell Gallery. The module is very much still in its early stages but is functional and intriguing. The reason you…