<?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, 25 Dec 2008 18:36:41 GMT</pubDate>
    <generator>Clearspace 2.5.9 (http://jivesoftware.com/products/clearspace/)</generator>
    <dc:date>2008-12-25T18:36:41Z</dc:date>
    <item>
      <title>Powershell: Controlling AMT Power States</title>
      <link>http://communities.intel.com/community/openportit/vproexpert/blog/2009/04/19/powershell-controlling-amt-power-states</link>
      <description>&lt;!-- [DocumentBodyStart:79068faa-96bf-4f1f-aca6-84e35c569087] --&gt;&lt;div class='jive-rendered-content'&gt;&lt;p&gt;I wanted to quickly share an example of how to &lt;span style="text-decoration: underline;"&gt;set&lt;/span&gt; the current power state of a provisioned Intel vPro system using Windows Powershell!&lt;/p&gt;&lt;p style="min-height: 8pt; height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;Take a moment, and ask yourself these quick questions:&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;Have you ever wanted to be able to &lt;span style="text-decoration: underline;"&gt;automate&lt;/span&gt; the powering up, or powering off, of multiple computers?&lt;/li&gt;&lt;li&gt;Is your company interested in saving money by not needlessly leaving computers powered on at night?&lt;/li&gt;&lt;li&gt;Do you have a time-critical environment, such as a call center, where you need to &lt;span style="text-decoration: underline;"&gt;reliably&lt;/span&gt; power up your computers so they are ready to go in the morning for agents?&lt;/li&gt;&lt;li&gt;Do you want to be able to create your own helpdesk tools to enable &lt;span style="text-decoration: underline;"&gt;remote&lt;/span&gt; reset of hung systems?&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;If you answered "&lt;em&gt;yes&lt;/em&gt;" to any of the previous questions, then hopefully this Powershell code will help you, as an administrator, achieve your goals! Let's take a look at how to perform the actions of:&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;Powering up a vPro (AMT) system&lt;/li&gt;&lt;li&gt;Powering down a vPro (AMT) system (not gracefully, just FYI)&lt;/li&gt;&lt;li&gt;Power cycling a vPro (AMT) system (also not graceful)&lt;br/&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;For the sake of simplicity, we'll continue to work with the &lt;span style="color: #008080;"&gt;ManageabilityStack.AmtSystem&lt;/span&gt; object that I have referenced in my previous article(s). If you aren't sure how to get the &lt;span style="color: #008080;"&gt;$Global:Amtdevice&lt;/span&gt; Powershell variable, please look back at &lt;a class="jive-link-blog-small" href="http://communities.intel.com/community/openportit/vproexpert/blog/2008/12/03/stepping-through-vpro-powershell-code"&gt;my other articles&lt;/a&gt;. This will also require the download of the &lt;a class="jive-link-external-small" href="http://www.intel.com/software/amt-dtk/"&gt;Intel AMT Developer Toolkit&lt;/a&gt;. You'll need the &lt;span style="color: #008080;"&gt;&lt;em&gt;Manageability Stack.dll&lt;/em&gt;&lt;/span&gt; library contained within.&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&gt;In order to control the remote power state of an AMT system, all you really need to know are these 3 hex values:&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="color: #008080;"&gt;0x10&lt;/span&gt;&lt;/strong&gt; = System reset&lt;/p&gt;&lt;p&gt;&lt;strong&gt;&lt;span style="color: #008080;"&gt;0x11&lt;/span&gt;&lt;/strong&gt; = Power on&lt;/p&gt;&lt;p&gt;&lt;strong&gt;&lt;span style="color: #008080;"&gt;0x12&lt;/span&gt;&lt;/strong&gt; = Power off&lt;/p&gt;&lt;p&gt;&lt;span style="color: #008080;"&gt;&lt;strong&gt;0x13&lt;/strong&gt;&lt;/span&gt; = Reset w/ power cycle&lt;/p&gt;&lt;p style="min-height: 8pt; height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;These hex values will be used with the &lt;span style="color: #008080;"&gt;$AmtSystem.Remote.SendRemoteControl()&lt;/span&gt; method to alter the power state of the remote system. The &lt;span style="color: #008080;"&gt;SendRemoteControl()&lt;/span&gt; method included with the DTK includes a number of parameters that go beyond the scope of this article, so we will pass hex value 0x0 to these parameters for the time being. In order to use the above hex values, simply pass the hex value as the first parameter of the &lt;span style="color: #008080;"&gt;SendRemoteControl()&lt;/span&gt; method. In order to fulfill the parameter requirements of this method, pass 5 additional parameters with the value &lt;span style="color: #008080;"&gt;0x0&lt;/span&gt;. Here are some examples:&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="text-decoration: underline;"&gt;&lt;span style="font-size: 12pt;"&gt;&lt;strong&gt;Powering up an AMT System&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="font-family: courier new,courier; color: #000080;"&gt;$Result = $AmtDevice.Remote.SendRemoteControl(0x11, 0x0, 0x0, 0x0, 0x0, 0x0)&lt;br/&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-family: courier new,courier; color: #000080;"&gt;Write-Host "Power command resulted with: ${Result}"&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;strong&gt;&lt;span style="text-decoration: underline;"&gt;&lt;span style="font-size: 12pt;"&gt;Powering off an AMT System&lt;/span&gt;&lt;/span&gt;&lt;/strong&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="font-family: courier new,courier; color: #000080;"&gt;$Result = $AmtDevice.Remote.SendRemoteControl(0x12, 0x0, 0x0, 0x0, 0x0, 0x0)&lt;br/&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-family: courier new,courier; color: #000080;"&gt;Write-Host "Power command resulted with: ${Result}"&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="font-size: 12pt;"&gt;&lt;span style="text-decoration: underline;"&gt;&lt;strong&gt;Power cycling an AMT System&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="font-family: courier new,courier; color: #000080;"&gt;$Result = $AmtDevice.Remote.SendRemoteControl(0x10, 0x0, 0x0, 0x0, 0x0, 0x0)&lt;br/&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-family: courier new,courier; color: #000080;"&gt;Write-Host "Power command resulted with: ${Result}"&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;The above samples show how to use the &lt;span style="color: #008080;"&gt;SendRemoteControl()&lt;/span&gt; method of the &lt;span style="color: #008080;"&gt;AmtRemoteControl&lt;/span&gt; .NET type in the Intel AMT Developer Toolkit (DTK) to control the power state of a remote AMT device.&lt;/p&gt;&lt;p style="min-height: 8pt; height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;If you have any questions about this, please leave a comment or send me a private message.&lt;/p&gt;&lt;p style="min-height: 8pt; height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;Sincerely,&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:79068faa-96bf-4f1f-aca6-84e35c569087] --&gt;</description>
      <category domain="http://communities.intel.com/community/openportit/vproexpert/blog/tags">customize</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">roi</category>
      <category domain="http://communities.intel.com/community/openportit/vproexpert/blog/tags">administrator</category>
      <category domain="http://communities.intel.com/community/openportit/vproexpert/blog/tags">manageability</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">sullivan</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">automate</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">developer</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">amt</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">sdk</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">windows</category>
      <category domain="http://communities.intel.com/community/openportit/vproexpert/blog/tags">powershell</category>
      <pubDate>Sun, 19 Apr 2009 16:25:53 GMT</pubDate>
      <author>pcgeek86@gmail.com</author>
      <guid>http://communities.intel.com/community/openportit/vproexpert/blog/2009/04/19/powershell-controlling-amt-power-states</guid>
      <dc:date>2009-04-19T16:25:53Z</dc:date>
      <clearspace:dateToText>11 months, 1 week ago</clearspace:dateToText>
      <clearspace:replyCount>2</clearspace:replyCount>
      <wfw:comment>http://communities.intel.com/community/openportit/vproexpert/blog/comment/powershell-controlling-amt-power-states</wfw:comment>
      <wfw:commentRss>http://communities.intel.com/community/openportit/vproexpert/blog/feeds/comments?blogPost=11787</wfw:commentRss>
    </item>
  </channel>
</rss>

