Recently I celebrated a wedding anniversary. Even though I didn’t forget I could have used a little help. So I figured since I’m in PowerShell all the time anyway, it could help. I built a little script to remind me of important dates. Let me walk you through the key steps. First, I’ll define a…
Get CIMInstance from PowerShell 2.0
I love the new CIM cmdlets in PowerShell 3.0. Querying WMI is a little faster because the CIM cmdlets query WMI using the WSMAN protocol instead of DCOM. The catch is that remote computers must be running PowerShell 3 which includes the latest version of the WSMAN protocol and the WinRM service. But if your…
File Age Groupings with PowerShell
I’m always talking about how much the object-nature of PowerShell makes all the difference in the world. Today, I have another example. Let’s say you want to analyze a directory, perhaps a shared group folder for a department. And you want to identify files that haven’t been modified in a while. I like this topic…
Half off Learn Windows PowerShell 3 in a Month of Lunches
Today, Learn Windows PowerShell 3 in a Month of Lunches is part of Manning’s Deal of the Day. This is the book for the absolute beginner and will teach you literally in a month of lunch breaks all you need to know to get started with PowerShell 3.0. Not convinced? Take a moment to read…
Get Local Admin Group Members in a New Old Way
Yesterday I posted a quick article on getting the age of the local administrator account password. It seemed appropropriate to follow up on a quick and dirty way to list all members of the local administrator group. Normally, I would turn to WMI (and have written about this in the past). But WMI is relatively…
How Old is the Admin Password
Here’s a quick one-liner to find out how old the administrator password age (in days) is on a remote machine. ([adsi]”WinNT://<COMPUTERNAME>/administrator”).passwordage.value/86400 This requires RPC/DCOM access to the remote computer. Or use PowerShell remoting with Invoke-Command: invoke-command { new-object PSObject -property @{ Computername = $env:computername AdminAge = ([adsi]”WinNT://$env:computername/administrator”).passwordage.value/86400 } } -ComputerName $computers | Select Computername,AdminAge
Test Hyper-V VHD Folders with PowerShell
I’ve recently added a USB 3.0 Express Card adapter to my laptop to provide USB 3.0 functionality. The added performance is very useful in my Hyper-V setup. However, I am running into a glitch that I have yet to figure out where the external drives (the Express card has 2 ports) are still attached and…
PowerShell Books Rule
PowerShell related titles continue to rule the roost, at least for Manning. Based on recent sales PowerShell titles occupy 40% of the top 10 list! I’m hoping this trend will continue later this spring with publication of the PowerShell Deep Dives book which is currently available as part of Manning’s MEAP. As of March 14th…
Friday Fun PowerShell Puzzlers
This week’s Friday Fun is a short PowerShell puzzler which I hope you’ll have some fun with and maybe even lead you to look something up and how knows what that might lead to! The following scrambled terms are all PowerShell related. The ones asterisked are PowerShell 3.0 related, but you’ve probably heard about the…
TechDays San Francisco
I’m very excited to announce that I’ll be presenting at TechDays San Francisco this year. The event runs May 2nd and 3rd. You can find the schedule here. Registration will be forthcoming. Seating will be limited so you won’t want to delay once it opens up. As you might expect I’ll be talking PowerShell, plus…
WMI Explorer from The PowerShell Guy
Several years ago, The PowerShell Guy, aka MoW, wrote a fantastic graphical PowerShell script that was a WMI Explorer. With this script you could connect to a computer and namespace, browse classes and view instances. A great way for discovering things about WMI. However Marc has moved on to other things I think and his…
Friday Fun Get Beer List
Well, another Friday and what goes better with it than beer. Of course I should mix in a little PowerShell as well. I live in the Syracuse, NY area and we have a terrific local brewery, Middle Ages Brewing Company. Not only is there a tasting room, but I can also get growler refills. Middle…
Get Scheduled Job Results
One of my favorite features in PowerShell 3.0 is the ability to run a PowerShell job as a scheduled task. I can easily setup a PowerShell background job to run a script but have it registered as a scheduled task. All you need is PowerShell 3.0. The job results are managed with the regular PowerShell…
PowerShell Deep Dive Authors at the PowerShell Summit
A question went out today about what authors of the forthcoming PowerShell Deep Dives book would be at the PowerShell Summit. We’re hoping to have the book out by then so you can get you hands on it. From what I can tell these authors will be at the summit: Adam Driscoll Jason Helmick Jeffery…
PowerShell in the Big O
I am speaking at SQL Saturday #197 in Omaha, NE on Saturday, April 6th. But even better, I will be doing a full day pre-conference session on Friday. The title of my session is Prof. PowerShell: or How I Learned to Stop Worrying and Love PowerShell. For those of you who don’t know, Omaha (ok,…