Eric's Technical Outlet

Learning the hard way so you don't have to

Category Archives: General IT

Using PowerShell for Consistent, Repeatable Windows Features Selection

Deploying Windows Servers can be a pain, even when you’ve got a templating system. How do I know that the template matches my current requirements? What do I know now that I didn’t know when that template was built? How do I easily manage the one-off differences between that template and the needs of this new system?

It’s even worse when you don’t have a template system or have overriding reasons to not to use one. You’re stuck building each new server from scratch, checking those boxes like it’s your first time.

Or, are you?

If you’re looking for a fast way to save or copy the list of selected Windows Server features and roles and apply them to a new system, PowerShell can easily help.

Read more of this post

Advertisements

PowerShell: Find Local Applications Blocked By a Remote Firewall

I’m sure we’ve all been there. You get an application that a vendor wrote and tested on a single, unfirewalled subnet. They sell it to you and you put it in your higher-security, multi-subnetted, firewalled environment, and it all falls down and goes boom. The vendor swears they’ve given you all the firewall information and then you go around-and-around for a few days, pulling network traces, etc.

So, I have thrown together a little script suite that should help you get to the bottom of it a little more quickly. Of course, a lot of times, you open one port only to discover that there is another port that will be needed that you couldn’t detect until the first one was open. Not much I can do about that in a PowerShell script, but watch the Altaro blog because I plan to demonstrate how to set up a test environment in Hyper-V to do this whole thing in a few minutes as opposed to the hours, or even weeks, it can sometimes take otherwise.

Read more of this post

Video Course Giveaway: Enter for a chance to win a free copy of my Hyper-V cluster video series

For the contest we have 4 copies of Building and Managing a Virtual Environment with Hyper-V Server 2012 R2 [Video] to be given away to 4 lucky winners.

How to enter:

To enter to win your copy of this video course, all you need to do is come up with a comment below highlighting the reason “why you would like to win this video course”.

Duration of the contest & selection of winners:

The contest is valid for 1 week from September 22nd, 2014 to September 29th, 2014, and is open to everyone. Winners will be selected on the basis of the contents of their posted comment.

About the video course:

Video Series Image

Building and Managing a Virtual Environment with Hyper-V Server 2012 R2 is a video series designed to present the complexities of Hyper-V and failover cluster configuration in easily digestible chunks. The segments feature demonstrations of the concepts explained in the video, being executed on an actual Hyper-V cluster.

You’ll begin with the basics of setting up your nodes, gathering them into the cluster, and working with your shared storage system. Then you’ll get an in-depth tour of managing your systems using the built-in graphical tools and PowerShell cmdlets. With that foundation, you’ll learn advanced concepts of virtual machine migration and cluster protection. You’ll also discover detailed maintenance steps, such as how Cluster-Aware Updating keeps your nodes patched without impacting virtual machines.

Building and Managing a Virtual Environment with Hyper-V Server 2012 R2 will present you with the knowledge and examples you need to successfully design and deploy your own Hyper-V clusters.

PowerShell: Use RACADM to Delete a Dell DRAC User by Index

Dell’s DRAC web interface allows you to create and modify DRAC users, but not remove them. The RACADM.EXE utility has the power to do this, but the syntax isn’t easy to remember. Rather than look it up each time, you can easily script this with PowerShell.

Read more of this post

PowerShell: Script that Calls Itself Recursively

To have a PowerShell script that calls itself recursively, use the following construct:

Invoke-Expression -Command $PSCommandPath

If the script uses parameters, use the following construct:

Invoke-Expression -Command ($PSCommandPath + ' -Parameter1 FixedValue -Parameter2 $VariableValue')

If you want to call the script exactly as it was initially called (be careful!):

Invoke-Expression -Command $PSCmdlet.MyInvocation.Line

Read more of this post

PowerShell: Sort a Windows Forms ListView without a Custom Comparer

I realize that PowerShell is mainly for command-line operations and scripting, but I’ve found more than a few uses to have it present a GUI. From my own portfolio, CoreFig would be a prime example. What GUIs are especially good for is presentation, selection, and manipulation of complex data structures. One control that’s suited for such uses is the ListView. Using a ListView in PowerShell isn’t more difficult than using most any other Windows Forms object. Sorting it, on the other hand, isn’t simple. Most of the solutions I found did not work at all, only did a sort-of sort, or did some complicated work with the .Net Framework. I have concocted a solution that stays in PowerShell.

Read more of this post

10GbE is Certainly in Your Future, But Must It Be In Your Present?

It’s interesting to watch how people will become accustomed to a certain standard to the point that they have difficulty imagining any other standard. One fairly recent trend in some computing circles is the insistence that all new server systems come installed with 10GbE adapters by default. While their positions have merit, it’s not a good rule… yet.

Read more of this post

No, I Will Not Be Your Friend

It’s not personal. In fact, that’s the point. But, it’s not exactly true, either. You’re going to have to click “Read More” to get the explanation for that.

Read more of this post

Defrag (Is) For Dummies

Kind of funny how one little word really changes the meaning of a sentence, doesn’t it? The title is a bit harsh but there is more than a little truth in it.

Read more of this post

How Android 4.2 and Firefox 19 Made Me Miss Microsoft

During the last couple of presidential cycles, the opposing candidate did a better job of getting me to vote against him than his rival did. The latest versions of Android on my phone and Firefox on my desktop are doing the same thing. Here I am, with papers to write for University, a major project to produce work for, and I need to get it all done in time to get some decent sleep because I need to be well-rested for my day job. But my normal tools of choice are holding me back. The bad thing is that they’re the ones that were supposed to save us from the bloated, unstable, user-unfriendly competition. The saviors have become the monsters.

Read more of this post