Skip to content

Instantly share code, notes, and snippets.

@factormystic
Last active December 16, 2015 14:59
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save factormystic/5452265 to your computer and use it in GitHub Desktop.
Save factormystic/5452265 to your computer and use it in GitHub Desktop.
SLAT test via WMI
require 'win32ole'
wmi = WIN32OLE.connect('winmgmts://')
result = wmi.ExecQuery('select SecondLevelAddressTranslationExtensions from Win32_Processor').to_enum.first
if result && result.SecondLevelAddressTranslationExtensions
puts 'SLAT Available'
else
puts 'SLAT Not Available'
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment