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…
Category: PowerShell
Friday Fun: Get Day of the Year with PowerShell
Earlier this week I was having some fun with @EnergizedTech on Twitter, playing around with dates in PowerShell. I’m not even sure where we started but the experience got me thinking and it’s Friday so let’s have some fun. While I can easily find out what the day of the year is for a given…
Creating Styling HTML Reports with PowerShell
Last month I did an updated version of my presentation on creating styling HTML reports in Windows PowerShell. This presentation was for the PowerShell virtual chapter of SQL PASS. As such, I came up with some SQL related demonstrations and fine tuned some demos from earlier presentations. You can download a zip file with a…
PowerShell Deep Dives is published!
>At long last the PowerShell Deep Dives book, published by Manning, is a reality! The book is a collection of PowerShell nuggets, tidbits, tutorials and tips that you won’t find anywhere else. Even more importantly, this is a book with a mission. None of the contributors or editors receive any payments for the book. All…
Friday Fun: New-Thriller Revised
A few years ago I posted a PowerShell script to autogenerate a synopsis for a standard thriller. It was a lot of fun and demonstrated out to build complex strings using the -F operator. I decided to revisit this script and tweaked it some. The main change is that instead of using the -F operator,…
Browsing PowerShell Commands
Whenever I’m exploring a new PowerShell module or snapin, one of the first things I do is list all of the commands found within the module. PS C:\scripts> get-command -module psworkflow CommandType Name ModuleName ———– —- ———- Function New-PSWorkflowSession PSWorkflow Cmdlet New-PSWorkflowExecutionOption PSWorkflow You can specify either a module or a snapin. Use the -module…
Turning CLI Tools into PowerShell Tools
Last night I gave a presentation for the Mississippi PowerShell User Group. My talk was based on the chapter I contributed to the forthcoming PowerShell Deep Dives book. In the chapter I explore different techniques for turning command line tools into PowerShell tools. My presentation demonstrated those techniques in action. As promised, I’ve bundled my…
Friday Fun: A PowerShell Tickler
I spend a lot of my day in the PowerShell console. As you might imagine, I often have a lot going on and sometimes it is a challenge to keep on top of everything. So I thought I could use PowerShell to help out. I created a PowerShell tickler system. Way back in the day…
Test 64-Bit Operating System
One of the great features of PowerShell is how much you can get from a relatively simple one line command. For example. you might want to test if a computer is running a 64-bit operating system. You can find out with a command as simple as this. PS C:\> (get-wmiobject win32_operatingsystem -comp chi-dc01).OsArchitecture -match “64”…
PowerShell Version Profiles
One of the best things about PowerShell 3.0, for me anyway, is the ability to run PowerShell 2.0 side by side. I often need to test commands and scripts in both versions not only for my writing projects but also when helping people out. Like many of you I have a PowerShell profile script that…
Scrub Up PowerShell Content
It is probably a safe bet to say that IT Pros store a lot of information in simple text files. There’s nothing with this. Notepad is ubiquitous and text files obviously easy to use. I bet you have text files of computer names, user names, service names, directories and probably a few that are unique…
PowerShell Scripting Games 2013 Impressions
Now that the PowerShell Scripting Games for 2013 are well underway, I thought I’d share my thoughts and impressions on what I’ve seen. I’m very impressed with the number of entries and generally the quality is pretty good. But as a judge I see repeated items that bear comment. These comments are in no particular…
Why Doesn’t My Pipeline Work?
I saw a little discussion thread on Twitter this morning which I felt needed a little more room to explain. Plus since we’re in ScriptingGames season beginners might like a few pointers. I always talk about PowerShell, objects and the pipeline. But sometimes what looks like a pipelined expression in the PowerShell ISE doesn’t behave…
PowerShell PopUp
At the recent PowerShell Summit I presented a session on adding graphical elements to your script without the need for WinForms or WPF. One of the items I demonstrated is a graphical popup that can either require the user to click a button or automatically dismiss after a set time period. If this sounds familiar,…