The other day fellow PowerShell MVP Adam Bertram published an article about using custom properties with Select-Object. It is a good article in that it gets you thinking about PowerShell in terms of objects and not simple text. But I want to take Adam’s article as a jumping off point and take his ideas a…
Tag: Scripting
Get Local Group Members Revisited
The other day I posted an article and function that used ADSI and PowerShell to list members of a local group. I had a few people report an unusual error that I couldn’t replicate. During the course of troubleshooting, I made a few changes to the original function to at least better handle the mysterious…
Get Local Group Members with PowerShell
Recently I posted a function to get information about local user accounts. I received a lot of positive feedback so it seemed natural to take this the next step and create a similar function to enumerate or list members of a local group, such as Administrators. The function, Get-LocalGroupMember, also relies on ADSI and is…
Getting Local User Accounts the PowerShell Way
It seems I’m always seeing requests and problems on getting local user accounts using PowerShell. However, even though we are at PowerShell 5.0, Microsoft has never released a set of cmdlets for managing local user accounts. So many of us have resorted to creating our own tools. I now have my latest iteration of a…
Friday Fun: Improved PowerShell Napping
So I had some fun with my post last week on taking a nap with PowerShell. I got some great feedback on Twitter and a new comments on the blog. My initial effort was a relatively simple PowerShell script which certainly got the job done. But I there were a number of areas where I…
Friday Fun: Number Crunching
Earlier this week I was looking at the GoFundMe website in the midst of debating a new project. One of the considerations I have for sites like this is the expense involved. Certainly I don’t expect this type of service to be free. But I started wondering about what net donations might look like. According…
Testing PowerShell HashTables
So I’ve been watching the PowerShell Toolmaking Fundamentals course on Pluralsight authored by Adam Bertram. You may be surprised that I watch other PowerShell related courses, but I always pick up something I didn’t know about, find a new teaching technique or something else that makes me say, “that was cool.” I have found a…
Updating Open Live Writer Auto Links with PowerShell
I’m sure it comes as no surprise to you that I do a fair bit of blogging and writing. This means I am always on the look out for tools and tricks to make the process easier. Recently Scott Hanselmen and others announced a resurrection of the old Microsoft Live Writer tool into an open…
A PowerShell New Year
First off, let me thank all of you for your support and interest in my work this past year. Without it I’d be another old man sitting in his bathrobe talking to himself. I hope I can keep your interest in 2016. To wrap up the year and to bring in the new, i have…
A Festive Christmas Message
The year is winding down and it is getting harder and harder to remain productive. So I’m trying to combine having some fun while still trying to help you learn PowerShell. I wrote a simple PowerShell script that randomly selects a Christmas themed quote and displays in a colorful fashion. When you run the script,…
A Better PowerShell More
In PowerShell, when I have a lot of output, I can use the legacy more.com command to page the results to the screen. Get-Process | more There’s not anything inherently wrong with this approach. Although one drawback is that it doesn’t work in the PowerShell ISE. For that reason alone I decided I needed a…
Adding Some Power to Hyper-V VM Notes
I use they Hyper-V virtual machine note to store system information. Here’s how I get it and set with PowerShell.
Friday Fun Learning from Spam
Today’s article is definitely on the amusing side, although hopefully it will make for an interesting learning opportunity. Earlier this week I was clearing out spam on my blog and found a comment that looked like the spammer’s template file. The comment contained a number of short entries like this: Sample spam template (Image Credit:…
Regions Rule the PowerShell ISE
Whenever I teach PowerShell and we get to talking about the PowerShell ISE, I encourage people to get in the habits of using regions. A region can help you organize your code and hide it when you don’t need the distraction. I think regions are especially helpful if you are creating a module file with…
PowerShell ISE Remote Possibilities
Normally, I think of the PowerShell ISE as a script development tool. I typically don’t think of it as a daily management tool, primarily because everything shares the same scope and if you are running scripts and aren’t careful can sometimes lead to unexpected results. But the ISE feature I really like is the ability…