I’ve been working on a project for a client that includes creating an HTML report, generated by PowerShell. I originally thought I would include a certain feature but decided against it. However, this is so cool I thought I’d share it with you as a Friday Fun article. I’ve done alot this year with some…
Managing Local Admin with PowerShell
Years ago when I was deep into VBScript and HTAs, I wrote a tool called PWDMan. It was an HTA that processed a list of computers and returned password age information for the local administrator account. It was also capable of setting a new account password. Apparently this is still a common task because I’ll…
Out with the Windows.old
Over the last few days I’ve started the process of upgrading my test virtual machines to Windows Server 2012 R2, or in the case of my mini Hyper-V server, to the final bits of Windows Hyper-V Server 2012 R2. In many cases I had been running the preview bits. I know I probably should have…
Runspaces, Remoting and Workflow, Oh My!
The other day on Twitter I saw a message about new script in the Microsoft Script Center on getting remote event logs with WMI. So I took a look at the script. If you take a minute to look at the script you’ll quickly realize this is not a script for beginners. My initial thought…
Resolving SIDs with WMI, WSMAN and PowerShell
In the world of Windows, an account SID can be a very enigmatic thing. Who is S-1-5-21-2250542124-3280448597-2353175939-1019? Fortunately, many applications, such as the event log viewer resolve the SID to an account name. The downside, is that when you are accessing that same type of information from PowerShell, you end up with the “raw’ SID….
Friday Fun: Pi-romania
I was doing some benchmarks the other day, and one of the tests was a calculation of pi using a particular algorithm. I found that quite interesting and naturally this made me curious if I could do the same calculation in PowerShell. Of course, if all you need is the value of pi, that is…
Mini Hyper-V Benchmarks
I’ve received a lot of interest in my mini Hyper-V project. I’m still running preview bits of Microsoft Hyper-V Server 2012 R2. Once final bits are released I’ll do a clean re-install. But until then I’ve been using it running about 4 virtual machines without a hiccup. I was getting some questions about benchmarks so…
Techmentor Las Vegas 2013 Session Materials
I had a terrific time at Techmentor last week in Las Vegas. I did 2 3-hour sessions. The longer sessions are intended to allow speakers time to go deeper into content and offer more detailed coverage than what you might get at a conference like TechEd. From my informal survey of attendees, many people enjoyed…
Friday Fun: Out-ConditionalColor
Last week I posted a Friday Fun article on parsing results from Invoke-Webrequest and displaying matching strings in color so that the book titles I’m interested in stand out. But the more I thought about it I realized I should take this a step further. The problem with Write-Host is that it doesn’t write anything…
Friday Fun Color My Web
Awhile ago I posted an article demonstrating using Invoke-Webrequest which is part of PowerShell 3.0. I used the page at Manning.com to display the Print and MEAP bestsellers. By the way, thanks to all of you who keep making PowerShell books popular. My original script simply wrote the results to the screen. But I decided…
A Better PowerShell Get Scheduled Job Results
Yesterday I posted a quick update on my code to get the most recent scheduled job result in PowerShell. I had been using a simple script. But the more I thought about it, the more I realized I really did need to turn it into a function with more flexibility. When creating a PowerShell based…
Get Most Recent PowerShell Scheduled Job Result
I think I’ve posted this before, but in any event even if I did, I’ve tweaked this code a bit. When you create a scheduled job in PowerShell 3.0, by default PowerShell will keep results on disk for the last 32 times the job ran. This can make it a little tricky if you want…
Friday Fun: Get Friday the 13th
I thought it might be fun today to use PowerShell to discover all the Friday the 13ths in a given year. So I put together a simple PowerShell one-liner. To make it flexible I’ll use a variable for the year, using the current year as my value. $year = (Get-date).Year Because there can only be…
PowerShell 4.0 A First Look
My first look at PowerShell 4.0 is now online at 4Sysops.com. A few interesting bits but with 3.0 still gaining traction I’m wondering how much people will actually adopt 4.0. It seems to me that some of the biggest features like Desired State Configuration will require Windows Server 2012 on the back end and it…
Mini Hyper-V: Operating System
When we left my project, the new mini server had booted up using Windows Hyper-V Server 2012 R2. This is a server core installation intended to only run Hyper-V, which is perfect for my needs. The server booted up with a temporary name and a DHCP assigned IP address. The next step is configure the…