<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:opensearch="http://a9.com/-/spec/opensearch/1.1/" xmlns:clearspace="http://www.jivesoftware.com/xmlns/clearspace/rss" xmlns:dc="http://purl.org/dc/elements/1.1/" version="2.0">
  <channel>
    <title>Intel vPro Expert Center Blog</title>
    <link>http://communities.intel.com/community/openportit/vproexpert/blog</link>
    <description>Intel vPro Expert Center Blog</description>
    <pubDate>Thu, 16 Apr 2009 13:36:01 GMT</pubDate>
    <generator>Clearspace 2.5.9 (http://jivesoftware.com/products/clearspace/)</generator>
    <dc:date>2009-04-16T13:36:01Z</dc:date>
    <item>
      <title>Intel AMT DTK: Synchronous Connections</title>
      <link>http://communities.intel.com/community/openportit/vproexpert/blog/2009/06/02/intel-amt-dtk-synchronous-connections</link>
      <description>&lt;!-- [DocumentBodyStart:6f73a91c-b366-44b7-87a0-3fe7c63abd6e] --&gt;&lt;div class='jive-rendered-content'&gt;&lt;p&gt;Hello vPro Experts,&lt;/p&gt;&lt;p style="min-height: 8pt; height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;In case you've worked with any of the Powershell code samples I've previously posted, you've probably noticed that the &lt;span style="color: #008080;"&gt;&lt;em&gt;AmtSystem.Connect()&lt;/em&gt;&lt;/span&gt; method executes asynchronously, and returns immediately. In this case, you'd have to develop some sort of loop in order to determine whether or not the connection was successful. Typically, I would just use this code to prevent a script from continuing before the connection was established:&lt;/p&gt;&lt;p style="min-height: 8pt; height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;&lt;span style="color: #008080;"&gt;&lt;span style="font-family: courier new, courier;"&gt;while ($amtdevice.State -eq "Connecting") { Start-Sleep 1 }&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style="min-height: 8pt; height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;But that's ugly, because, what happens if it never connects? Although it's nice to have the ability to asychronously connect to AMT devices, writing code and understanding the logic, to handle async processes is significantly more difficult than writing code that is synchronous. For this reason, we will look at how to modify and recompile the &lt;em&gt;ManageabilityStack&lt;/em&gt; .NET assembly in the Intel AMT Developer Toolkit (DTK) to allow synchronous connections to AMT from PowerShell code.&lt;/p&gt;&lt;p style="min-height: 8pt; height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;In order to perform the next steps, you'll need the following:&lt;/p&gt;&lt;p style="min-height: 8pt; height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;ul&gt;&lt;li&gt;The &lt;a class="jive-link-external-small" href="http://software.intel.com/en-us/articles/download-the-latest-version-of-manageability-developer-tool-kit/"&gt;Intel AMT DTK source code&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a class="jive-link-external-small" href="http://www.microsoft.com/downloads/details.aspx?FamilyId=F3FBB04E-92C2-4701-B4BA-92E26E408569&amp;amp;displaylang=en"&gt;Microsoft Visual Studio 2008&lt;/a&gt; (the Express edition is &lt;span style="text-decoration: underline;"&gt;&lt;strong&gt;fully functional and free&lt;/strong&gt;&lt;/span&gt;!)&lt;/li&gt;&lt;li&gt;Microsoft Windows &lt;a class="jive-link-external-small" href="http://www.microsoft.com/windowsserver2003/technologies/management/powershell/download.mspx"&gt;PowerShell 1.0&lt;/a&gt; or &lt;a class="jive-link-external-small" href="http://www.microsoft.com/downloads/details.aspx?FamilyID=c913aeab-d7b4-4bb1-a958-ee6d7fe307bc"&gt;2.0 CTP3&lt;/a&gt;&lt;/li&gt;&lt;/ul&gt;&lt;p style="min-height: 8pt; height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;Once you've installed these components, continue on:&lt;/p&gt;&lt;p style="min-height: 8pt; height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;ol start="1"&gt;&lt;li&gt;Download the Intel AMT DTK source code and extract to a folder&lt;/li&gt;&lt;li&gt;Navigate to &lt;span style="color: #008080;"&gt;&lt;em&gt;&amp;lt;Source&amp;gt;\Manageability Stack&lt;/em&gt;&lt;/span&gt; and open the &lt;em&gt;&lt;span style="color: #008080;"&gt;Manageability Stack.csproj&lt;/span&gt;&lt;/em&gt; file in Visual Studio 2008&lt;/li&gt;&lt;li&gt;Open the &lt;em&gt;AmtSystem.cs&lt;/em&gt; file in the Visual Studio Solution Explorer&lt;/li&gt;&lt;li&gt;Rename the &lt;em&gt;Connect()&lt;/em&gt; method to &lt;em&gt;ConnectAsync&lt;/em&gt;()&lt;/li&gt;&lt;li&gt;Copy the following code above the ConnectAsync() method:&lt;br/&gt;&lt;span style="color: #0000ff;"&gt;public void Connect()&lt;br/&gt;{&lt;br/&gt;   if (State != AmtSystemObjState.Disconnected) return;&lt;br/&gt;   ChangeState(AmtSystemObjState.Connecting);&lt;br/&gt;   ConnectEx(this);&lt;br/&gt;}&lt;/span&gt;&lt;/li&gt;&lt;li&gt;In the Visual Studio Solution Explorer, right-click the Manageability Stack project, and click Build&lt;/li&gt;&lt;li&gt;Go to your &lt;span style="color: #008080;"&gt;&lt;em&gt;&amp;lt;Source&amp;gt;\Manageability Stack\obj\Debug&lt;/em&gt;&lt;/span&gt; folder, and grab your new &lt;em&gt;&lt;span style="color: #008080;"&gt;ManageabilityStack.dll&lt;/span&gt;&lt;/em&gt; .NET assembly&lt;/li&gt;&lt;/ol&gt;&lt;p style="min-height: 8pt; height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;Now that you have a recompiled &lt;em&gt;ManageabilityStack&lt;/em&gt; assembly, you can load this into PowerShell, and connect &lt;span style="text-decoration: underline;"&gt;synchronously&lt;/span&gt; using the &lt;em&gt;Connect&lt;/em&gt;() method! &lt;img height="16px" src="http://communities.intel.com/images/emoticons/happy.gif" width="16px"/&gt;&lt;/p&gt;&lt;p style="min-height: 8pt; height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;&lt;strong&gt;&lt;span style="text-decoration: underline;"&gt;Update&lt;/span&gt;&lt;/strong&gt;: I attached the &lt;em&gt;AmtSystem.cs&lt;/em&gt; file to this blog post, if you're not comfortable modifying source code yourself! You'll still need to replace the file, open the project, and recompile the library though &lt;img height="16px" src="http://communities.intel.com/images/emoticons/happy.gif" width="16px"/&gt;&lt;/p&gt;&lt;p style="min-height: 8pt; height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;&lt;strong&gt;Trevor Sullivan&lt;/strong&gt;&lt;/p&gt;&lt;p&gt;&lt;em&gt;Systems Engineer&lt;/em&gt;&lt;/p&gt;&lt;p&gt;OfficeMax Corporation&lt;/p&gt;&lt;/div&gt;&lt;!-- [DocumentBodyEnd:6f73a91c-b366-44b7-87a0-3fe7c63abd6e] --&gt;</description>
      <category domain="http://communities.intel.com/community/openportit/vproexpert/blog/tags">programming</category>
      <category domain="http://communities.intel.com/community/openportit/vproexpert/blog/tags">automation</category>
      <category domain="http://communities.intel.com/community/openportit/vproexpert/blog/tags">vpro</category>
      <category domain="http://communities.intel.com/community/openportit/vproexpert/blog/tags">administer</category>
      <category domain="http://communities.intel.com/community/openportit/vproexpert/blog/tags">code</category>
      <category domain="http://communities.intel.com/community/openportit/vproexpert/blog/tags">developer</category>
      <category domain="http://communities.intel.com/community/openportit/vproexpert/blog/tags">visual</category>
      <category domain="http://communities.intel.com/community/openportit/vproexpert/blog/tags">dtk</category>
      <category domain="http://communities.intel.com/community/openportit/vproexpert/blog/tags">administration</category>
      <category domain="http://communities.intel.com/community/openportit/vproexpert/blog/tags">amt</category>
      <category domain="http://communities.intel.com/community/openportit/vproexpert/blog/tags">microsoft</category>
      <category domain="http://communities.intel.com/community/openportit/vproexpert/blog/tags">studio</category>
      <category domain="http://communities.intel.com/community/openportit/vproexpert/blog/tags">c#</category>
      <category domain="http://communities.intel.com/community/openportit/vproexpert/blog/tags">coding</category>
      <category domain="http://communities.intel.com/community/openportit/vproexpert/blog/tags">.net</category>
      <pubDate>Tue, 02 Jun 2009 20:17:27 GMT</pubDate>
      <author>pcgeek86@gmail.com</author>
      <guid>http://communities.intel.com/community/openportit/vproexpert/blog/2009/06/02/intel-amt-dtk-synchronous-connections</guid>
      <dc:date>2009-06-02T20:17:27Z</dc:date>
      <clearspace:dateToText>7 months, 2 weeks ago</clearspace:dateToText>
      <wfw:comment>http://communities.intel.com/community/openportit/vproexpert/blog/comment/intel-amt-dtk-synchronous-connections</wfw:comment>
      <wfw:commentRss>http://communities.intel.com/community/openportit/vproexpert/blog/feeds/comments?blogPost=12066</wfw:commentRss>
    </item>
    <item>
      <title>Powershell: Exploring the Management Engine</title>
      <link>http://communities.intel.com/community/openportit/vproexpert/blog/2009/02/24/powershell-exploring-the-management-engine</link>
      <description>&lt;!-- [DocumentBodyStart:b272b464-5cd0-4d87-a1fe-9ebf56ce27c6] --&gt;&lt;div class='jive-rendered-content'&gt;&lt;p&gt;Hello vPro Experts! &lt;img height="16px" src="http://communities.intel.com/images/emoticons/happy.gif" width="16px"/&gt;&lt;/p&gt;&lt;p style="min-height: 8pt; height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;I would like to take some time to touch on exploration of the management engine via the local interface (specifically the HECI driver). In order to follow the exercise here, you'll need to have &lt;a class="jive-link-external-small" href="http://en.wikipedia.org/wiki/Windows_PowerShell"&gt;Windows Powershell&lt;/a&gt; installed, have the &lt;a class="jive-link-external-small" href="http://www.intel.com/software/amt-dtk/"&gt;Intel AMT Developer Toolkit&lt;/a&gt; downloaded and installed, and have an AMT client (&lt;em&gt;does not need to be provisioned&lt;/em&gt;) with the HECI driver installed. The HECI driver should be downloadable from your OEM.&lt;/p&gt;&lt;p style="min-height: 8pt; height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;To give you a high-level idea of the program flow we'll use to access the AMT device, consider the following:&lt;/p&gt;&lt;p style="min-height: 8pt; height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;ol&gt;&lt;li&gt;Load the "&lt;span style="color: #666699;"&gt;Manageability Stack.dll&lt;/span&gt;" .NET library&lt;/li&gt;&lt;li&gt;Create an instance of the &lt;span style="color: #666699;"&gt;ManageabilityStack.HeciWrapper&lt;/span&gt; object&lt;/li&gt;&lt;li&gt;Reference the properties and methods of the &lt;span style="color: #666699;"&gt;HeciWrapper&lt;/span&gt; object, and the &lt;span style="color: #666699;"&gt;HeciMeInfo&lt;/span&gt; object (provided by the &lt;span style="color: #666699;"&gt;HeciWrapper.MeInfo&lt;/span&gt; property)&lt;/li&gt;&lt;/ol&gt;&lt;p style="min-height: 8pt; height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;Here is the Powershell code that correlates to the above process:&lt;/p&gt;&lt;p style="min-height: 8pt; height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;&lt;span style="font-size: 12pt;"&gt;&lt;span style="text-decoration: underline;"&gt;&lt;strong&gt;Loading the .NET Library&lt;/strong&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style="min-height: 8pt; height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;&lt;span style="color: #339966;"&gt;# Load the Manageability Stack .NET library&lt;/span&gt;&lt;/p&gt;&lt;p&gt;$AmtLib = "C:\Program Files\Intel\Manageability Developer Tool Kit\Manageability Stack.dll"&lt;br/&gt;[System.Reflection.Assembly]::LoadFile($AmtLib)&lt;br/&gt;&lt;span style="color: #339966;"&gt;# Create a HeciWrapper object&lt;/span&gt;&lt;/p&gt;&lt;p&gt;$Heci = New-Object ManageabilityStack.HeciWrapper&lt;/p&gt;&lt;p style="min-height: 8pt; height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;&lt;span style="color: #339966;"&gt;# Pipe the $Heci variable into the Get-Member cmdlet to determine what properties&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="color: #339966;"&gt;# and methods are available to us.&lt;/span&gt;&lt;/p&gt;&lt;p&gt;$Heci | Get-Member&lt;/p&gt;&lt;p style="min-height: 8pt; height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;&lt;span style="font-size: 12pt;"&gt;&lt;span style="text-decoration: underline;"&gt;&lt;strong&gt;Obtaining a list of embedded certificate hashes&lt;/strong&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style="min-height: 8pt; height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;&lt;span style="color: #339966;"&gt;# List embedded certificate hashes&lt;/span&gt;&lt;br/&gt;$Heci.MeInfo.EnumerateHashHandles()&lt;/p&gt;&lt;p style="min-height: 8pt; height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;&lt;span style="font-size: 12pt;"&gt;&lt;span style="text-decoration: underline;"&gt;&lt;strong&gt;Getting the BIOS and AMT Versions&lt;/strong&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style="min-height: 8pt; height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;&lt;span style="color: #339966;"&gt;# Retrieve the AMT version&lt;/span&gt;&lt;br/&gt;Write-Host "AMT version: $($Heci.Versions.Versions["AMT"])"&lt;br/&gt;&lt;span style="color: #339966;"&gt;# Retrieve the BIOS version&lt;/span&gt;&lt;br/&gt;Write-Host "BIOS version: $($Heci.Versions.BiosVersion)"&lt;/p&gt;&lt;p style="min-height: 8pt; height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;&lt;span style="font-size: 12pt;"&gt;&lt;span style="text-decoration: underline;"&gt;&lt;strong&gt;Retrieving Provisioning Information&lt;/strong&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style="min-height: 8pt; height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;&lt;span style="color: #339966;"&gt;# Retrieve the provisioning server name&lt;/span&gt;&lt;br/&gt;Write-Host "Provisioning server: $($Heci.MeInfo.GetAuditRecord().ProvServerFQDN)"&lt;br/&gt;&lt;span style="color: #339966;"&gt;# Determine provisioning date&lt;br/&gt;# This will return "01/01/0001 00:00:00" if not provisioned&lt;/span&gt;&lt;br/&gt;Write-Host "Provision date: $($Heci.MeInfo.GetAuditRecord().TlsStartTime)"&lt;br/&gt;&lt;span style="color: #339966;"&gt;# Get provisioning mode (Enterprise, SMB, etc.)&lt;/span&gt;&lt;br/&gt;Write-Host "Provision mode: $($Heci.MeInfo.GetProvisioningMode().ProvisioningMode)"&lt;br/&gt;&lt;span style="color: #339966;"&gt;# Get provisioning state&lt;/span&gt;&lt;br/&gt;Write-Host "Provision state: $($Heci.MeInfo.GetProvisioningState())"&lt;/p&gt;&lt;p style="min-height: 8pt; height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;-----------------------------------&lt;/p&gt;&lt;p style="min-height: 8pt; height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;I hope these code samples are able to help you out in your administration / engineering endeavors! Please let me know if you have any questions, and don't forget that in Powershell .... when in doubt .... use &lt;span style="color: #808080;"&gt;Get-Member&lt;/span&gt; to discover what information is available to you!&lt;/p&gt;&lt;p style="min-height: 8pt; height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;&lt;strong&gt;Trevor Sullivan&lt;/strong&gt;&lt;/p&gt;&lt;p&gt;&lt;em&gt;Systems Engineer&lt;/em&gt;&lt;/p&gt;&lt;p&gt;OfficeMax Corporation&lt;/p&gt;&lt;/div&gt;&lt;!-- [DocumentBodyEnd:b272b464-5cd0-4d87-a1fe-9ebf56ce27c6] --&gt;</description>
      <category domain="http://communities.intel.com/community/openportit/vproexpert/blog/tags">vpro</category>
      <category domain="http://communities.intel.com/community/openportit/vproexpert/blog/tags">engineer</category>
      <category domain="http://communities.intel.com/community/openportit/vproexpert/blog/tags">troubleshoot</category>
      <category domain="http://communities.intel.com/community/openportit/vproexpert/blog/tags">automate</category>
      <category domain="http://communities.intel.com/community/openportit/vproexpert/blog/tags">deploy</category>
      <category domain="http://communities.intel.com/community/openportit/vproexpert/blog/tags">microsoft</category>
      <category domain="http://communities.intel.com/community/openportit/vproexpert/blog/tags">amt</category>
      <category domain="http://communities.intel.com/community/openportit/vproexpert/blog/tags">administration</category>
      <category domain="http://communities.intel.com/community/openportit/vproexpert/blog/tags">sullivan</category>
      <category domain="http://communities.intel.com/community/openportit/vproexpert/blog/tags">tools</category>
      <category domain="http://communities.intel.com/community/openportit/vproexpert/blog/tags">powershell</category>
      <category domain="http://communities.intel.com/community/openportit/vproexpert/blog/tags">script</category>
      <category domain="http://communities.intel.com/community/openportit/vproexpert/blog/tags">intel</category>
      <category domain="http://communities.intel.com/community/openportit/vproexpert/blog/tags">automation</category>
      <category domain="http://communities.intel.com/community/openportit/vproexpert/blog/tags">trevor</category>
      <category domain="http://communities.intel.com/community/openportit/vproexpert/blog/tags">manage</category>
      <pubDate>Wed, 25 Feb 2009 04:26:00 GMT</pubDate>
      <author>pcgeek86@gmail.com</author>
      <guid>http://communities.intel.com/community/openportit/vproexpert/blog/2009/02/24/powershell-exploring-the-management-engine</guid>
      <dc:date>2009-02-25T04:26:00Z</dc:date>
      <clearspace:dateToText>9 months, 6 days ago</clearspace:dateToText>
      <clearspace:replyCount>3</clearspace:replyCount>
      <wfw:comment>http://communities.intel.com/community/openportit/vproexpert/blog/comment/powershell-exploring-the-management-engine</wfw:comment>
      <wfw:commentRss>http://communities.intel.com/community/openportit/vproexpert/blog/feeds/comments?blogPost=11923</wfw:commentRss>
    </item>
  </channel>
</rss>

