Interface Technical Training

How to use PowerShell to check for SLAT (Second Level Address Translation) for Windows 8 Hyper-V

I don’t know if you know this but if your going to try and use Hyper-V on Windows 8 your processor must support SLAT (Second Level Address Translation). Many of the Intel i7 processors do, but not all of them. I wanted to check a list of computers to see if they supported the extensions for SLAT but the current wisdom on the Internet said I needed to use SysInternals CoreInfo.exe. I didn’t like this solution: Sure it works on a single computer, but I needed to check several.

A friend of mine, Mike F Robbins PowerShell guru, recently solved this problem and I wanted to give him credit for using WMI and the win32_processor class to make this an easy task. I also wanted to add my own spin on this in case you haven’t upgraded to PowerShell V3 yet.

First, go check out the original post by Mike: Use PowerShell to Check for Processor (CPU) Second Level Address Translation (SLAT) Support.  

Mike is using the Get-CimInstance cmdlet for PowerShell Version 3. You can still accomplish the same goal if your on Version 2 (but really, its time to update your system….really) So, I’m going to use the Get-WmiObject cmdlet. Now, it’s ‘ok’ to use the –computername switch, but I don’t like using RPC because of my firewalls, so I’m going to use PowerShell Remoting instead.  Also note that I’m only checking for SLAT support and not the additional virtualization information that Mike discovered.

Here’s the long form:

PS>Invoke-Command –ComputerName (Get-Content c:\computers.txt) –ScriptBlock {

Get-WmiObject –Class Win32_Processor | Select-Object –property __Server, SecondLEvelAddressTranslationExtensions}

Because I was doing this interactively (real-time) here is the alias-enhanced version that I actually typed on my admin station before cleaning it up for the blog post.

PS> icm –comp (cat c:\computers.txt) {gwmi win32_processor | select __Server, SecondLevelAddressTranslationExtensions}

So, if your using PowerShell version 2 you can still check for SLAT!

P.S. Now go and upgrade your PowerShell version.

Knowledge is PowerShell

Jason Helmick
Director of PowerShell Technologies
Interface Technical Training

See what people are saying...

  1. Pingback: Calculate What Date Thanksgiving is on with PowerShell | Mike F Robbins

Share your thoughts...

We encourage people to join in on the discussion. Please keep in mind however, that all comments are moderated according to our comment policy, and all links are nofollow. Do not use keywords in the name field. Let's keep the conversation professional and meaningful.