Click here to Skip to main content
15,867,686 members
Articles / Programming Languages / Java
Article

Use PowerShell to Manage your Intel AMT Data

2 Jun 2011CPOL3 min read 19.4K   4  
This article describes how to use Windows PowerShell to manage your Intel® AMT data. Treat data stores as file systems using a few simple commands.

This article is in the Product Showcase section for our sponsors at CodeProject. These articles are intended to provide you with information on products and services that we consider useful and of value to developers.

One feature of Windows PowerShell is that it gives you the ability treat various data stores as if they were file systems. An advantage of this approach is that you can use a relatively small set of built-in commands to manage your data stores. This is because only thing that changes from data store to data store is the path to individual items, while the commands to operate on the data remain the essentially the same. Another advantage is that you can start at root of the data store and navigate or explore the contents just like you would a file system. Building on this concept, the PowerShell Module for Intel® vPro™ allows you to treat Intel AMT as if it was a file system. This means you can manage all the hardware settings using just a few built-in PowerShell commands like Get-Item and Set-Item. Furthermore, you can navigate through the various firmware settings using built-in commands like Get-ChildItem and Set-Location. There are two different types of drives supported by Intel’s module.

  • The Heci drive
  • The AmtSystem drive

The HECI drive lets you manage local AMT driver settings through the host. HECI stands for Host Embedded Controller Interface. This drive is exposes all settings available to the local host driver interface. The HECI drive is accessible even if AMT is not setup. You must be running as Admin in order to have the necessary permissions to access items in the HECI drive, and the Intel drivers must be installed as well. On the other hand, the AmtSystem drive exposes all the settings of a fully setup AMT system remotley. You can mount a new AmtSystem drive to a remote AMT system using the built in New-PSDrive cmtlet.

Before we demonstrate how to access these drives let’s take care of some of the module basics. First, you can download and install the module here. Next, make sure PowerShell scripting has been enabled by using the Get-ExecutionPolicy cmtlet. If the execution policy is “Restricted” then you will need to change it to something higher than Restricted such as Unnrestricted or AllSigned based on your security preferences.

>Set-ExecutionPolicy Unrestricted

Next, you will need to need to make sure Intel’s commands are available to PowerShell by using the Import-Module command.

>Import-Module IntelvPro

Now that you have the Intel module installed, and PowerShell scripting is enabled, and the module’s commands have been imported into you PowerShell session, you are ready to access AMT drives.

Get the AMT version from the local host driver

>Get-Item HECI:\Config\Etc\CodeVersions\AMT

 

Name               Value  
-------            -------  
IdleWakeTimeout    1

List all version supported by the local host system

>Get-ChildItem HECI:\Config\Etc\CodeVersions

Note: If you have AMT 6.2 or above firmware you can setup AMT with a single command

>Enable-AmtClientMode

Now let’s mount a new AmtSystem drive and access information using it. First, we will need the AMT credentials for mounting an AmtSystem drive. We did not need to do this for the HECI drive because running as admin on the local host system gave us permission. However, for remote access we will need to provide some credentials.

Get credentials for accessing AMT remotely.

>$myCreds = Get-Credential

Now mount the drive to a remote computer using the credentials

>New-PSDrive -Name amt -PSProvider AmtSystem -Root / -ComputerName amt1.vprodemo.com  -Credential $myCreds

 

Name     Device    Provider    Root  
-------  --------  ----------  -----  
amt      AMT       7.0         AmtSystem  /

Lets see how long the firmware is configured to stay awake after the host has asleep

>Get-Item amt:\config\etc\PowerPolicy\IdleWakeTimeout

 

Name             Value  
-------          -------  
IdleWakeTimeout  1

Let’s change amount of time the firmware stays awake after the host as fallen asleep.

>Set-Item amt:\config\etc\PowerPolicy\IdleWakeTimeout 65535

These are just a few examples on how to use a drive provider to manage firmware settings. You can a help for each drive provider as shown below.

>Get-Help HECI

>Get-Help AmtSystem

With the Intel Module you can now write PowerShell scripts that conist of may Set-Item commands that configure the embedded system the way you want.

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


Written By
Canada Canada
Randall has worked for Intel for a number of years in various software engineering roles. He currently works on enabling Intel's business clients.

Comments and Discussions

 
-- There are no messages in this forum --