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

Posted in PowerShell, Windows 8 | Posted in , , , , , , , , , , , | 1 Comment

Your Feedback: (One Response)

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

  • Leave a Reply

    Your email address will not be published. Required fields are marked *

    You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code class="" title="" data-url=""> <del datetime=""> <em> <i> <q cite=""> <strike> <strong> <pre class="" title="" data-url=""> <span class="" title="" data-url="">