<?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:5beac904-d905-475f-8123-db2f0ec47c56] --&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:5beac904-d905-475f-8123-db2f0ec47c56] --&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>
    <item>
      <title>Which SCS Service setting to go for - script or from DB? Everything you ever wanted to know...</title>
      <link>http://communities.intel.com/community/openportit/vproexpert/blog/2009/04/15/which-scs-service-setting-to-go-for--script-or-from-db-everything-you-ever-wanted-to-know</link>
      <description>&lt;!-- [DocumentBodyStart:316caa93-c3fa-405c-b9bd-0f68908adce5] --&gt;&lt;div class='jive-rendered-content'&gt;&lt;p&gt;If you are using Intel SCS 5.x, after you've installed it you will need to decide whether you want to configure the scs service to either get configuration parameters from a script or from the DB. This seemingly innocuous decision has some technical implications, so here's the background..&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;strong&gt;Choice A&lt;/strong&gt; - get configuration parameters from the &lt;strong&gt;DB&lt;/strong&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;Let us first define what are the configuration parameters - they are the fields of a vPro system - such as: FQDN, AD OU, Profile - the important ones that are required for completing provisioning - and the remaining informative attributes, such as AMT firmware version etc. Therefore the configuration parameters that are necessary to have are FQDN (or hostname) AD OU path (if you are integrating with Active Directory) and the SCS provisioning profile being assigned to the vPro system. Where will the information for these 3 fields come from?&lt;/p&gt;&lt;p style="min-height: 8pt; height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;The wording of this option might be slightly misleading as you might (wrongfully) assume that the configuration parameters to get your vPro systems provisioned smoothly are sitting and waiting in the DB for you and will provide you an extra smooth provisioning experience over above the other method (using a script). This is however not the case; the configuration parameters are empty to begin with and only after going through a (successful or unsuccessful) provisioning process for each vPro machine, it will in turn have these configuration parameters populated in the DB, so that &lt;span style="text-decoration: underline;"&gt;subsequent&lt;/span&gt; provisioning attempts will in fact be able to rely on these now populated configuration parameters in the DB.&lt;/p&gt;&lt;p style="min-height: 8pt; height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;Let us consider the flow of events...&lt;/p&gt;&lt;p style="min-height: 8pt; height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;A vPro system needs to initiate the provisioning process and let the SCS know about its existence - this is commonly known as the 'hello packet'. The hello packet contains a UUID (unique identifier), certificate hash or PID, MAC Address and ip address. Purely technically speaking, this will manifest itself by a new entry appearing in the AMTS table in the SCS DB. At that point you are missing the FQDN, AD OU path and profile ID. Once a new entry makes it into the AMTS table, it will also appear in the SCS Console as an unconfigured system with the UUID field populated, but the rest being blank.&lt;/p&gt;&lt;p style="min-height: 8pt; height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;You now have an option to manually double click on the row in the SCS Console and enter these 3 fields. Once you've done that, the information will now be sitting also in the UUID_MAPS table which is also know as the configuration parameters. This is typically not a scalable method and therefore the current BKM is to rely on a client side utility to send more than just the UUID, pre-provisioning information (cert hash or PID) and IP address, but also the FQDN, AD OU path and a profile ID.&lt;/p&gt;&lt;p style="min-height: 8pt; height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;The utility that has been designed to do this is the Activator utility which comes bundled when you download the SCS application (this blog posting won't go into the details of how to use the Activator Utility and what options you have and will assume you have an understanding of how to do this). Therefore instead of manually (and quite error prone) populating the fields, you can now have a utility that effectively pushes all the information required for provisioning into the UUID_MAPS table as well.&lt;/p&gt;&lt;p style="min-height: 8pt; height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;Another last option is to create a list mapping UUIDs and pre-assigning them FQDNs and uploading it into the UUID_MAPS table. This is more difficult as it relies on the OEM providing you with an accurate list of all the UUIDs prior to receiving the systems. This is technically feasible but logistically more difficult and as such is a rarer implementation.&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;strong&gt;Choice B&lt;/strong&gt; - get configuration parameters from the &lt;strong&gt;script&lt;/strong&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;This method might be less popular, as it is a bit more complex and should be used only when the circumstances necessesitate it. The script would typically be a VBscript for which a sample script is provided when you install the SCS service. What the server script does in essence is set the AD OU path and profile ID. The FQDN still needs to be provided by the vPro machine itself and for that it will rely on either the activator utility (as mentioned above) or client side vbscript - either of which will typically rely on a WMI query.&lt;/p&gt;&lt;p style="min-height: 8pt; height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;Purely technically speaking, the script takes the different parameters available to it and constructs an XML file (map.xml) that is formulated in a manner that is recognised and can be consumed by the SCS application. If there aren't enough permissions for the script to run locally, any necessary parameters are missing, or if the XML is not formulated properly then the SCS will complain about a missing XML file.&lt;/p&gt;&lt;p style="min-height: 8pt; height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;Using the server side script provides you the flexibitliy of making changes to the AD OU path and profile ID further down the line as opposed to the client side only method, which would have required you to pre-package the parameters to invoke the client utility and any changes would involve deploying a new package to all machines.&lt;/p&gt;&lt;p style="min-height: 8pt; height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;The server side script also allows you to overcome any permissions related issues and security concerns, as the client side only method typically requires administrator priveleges and involves letting each client right into the main DB (which for some security experts is an opportunity for malicious behaviour). Therefore a 2-tiered approach is possible where the client side (script or activator) send information into an interim DB and the server script reads the information from the interim DB. The trigger for the server script to run, is for a new entry to appear in the AMTS table but not have an entry in the UUID_MAPS table - i.e. a hello packet has arrived and there are no present configuration parameters.&lt;/p&gt;&lt;p style="min-height: 8pt; height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;Finally, the server script is essential if any further manipulations are required in order to accommodate a particular environment. Such is the case when the FQDN queried on the vPro client has a domain suffix of an Active Directory domain, but there is a separate non-AD integrated network domain and any queries to DNS will return the network domain FQDN. This requires provisioning the vPro system with the network domain, which could either be hard coded as a constant (like the AD OU path and profile ID) if there is only one, or it will need to be dynamic and poll DNS (though something like nslookup on IP address) to replace the AD FQDN with a network FQDN. Provisioning will succeed regardless, but the problem will be later on when trying to manage the vPro machine if you will be using AD integration and therefore will need to conform to the Kerberos protocol.&lt;/p&gt;&lt;p style="min-height: 8pt; height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;A situation can arise where you have configured SCS to use the script, however the the configuration parameters have already been populated due to a previous provisioning attempt - be it fully successful or not, since the parameters are in the DB already, the trigger for the server script to run will be missing and therefore it won't execute again. This scenario is typically come across in testing when the same machine is re-used. There are some 'real-world' scenarios such as machine has broken, is re-imaged and fixed by IT department, the client side provisioniong components (activator) kick-in on startup (typically) but the configuration parameters are already in the SCS DB and therefore the script will not run and provisioning won't succeed. Unfortunately SCS does not automatically remove the configuration parameters for machines that are partially or even fully unprovisioned. It can only be done manually when a system is deleted from the SCS Console and the 'delete configuration parameters' must explicitly be selected.&lt;/p&gt;&lt;p style="min-height: 8pt; height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;This turned out to be a longer posting than originally intended... but if you've made this far, hopefully you've picked up a few useful nuggets of information...&lt;/p&gt;&lt;p style="min-height: 8pt; height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;Tal&lt;/p&gt;&lt;/div&gt;&lt;!-- [DocumentBodyEnd:316caa93-c3fa-405c-b9bd-0f68908adce5] --&gt;</description>
      <category domain="http://communities.intel.com/community/openportit/vproexpert/blog/tags">tal_elgar</category>
      <category domain="http://communities.intel.com/community/openportit/vproexpert/blog/tags">scs</category>
      <category domain="http://communities.intel.com/community/openportit/vproexpert/blog/tags">scs_5.0</category>
      <category domain="http://communities.intel.com/community/openportit/vproexpert/blog/tags">provisioning</category>
      <category domain="http://communities.intel.com/community/openportit/vproexpert/blog/tags">setup_configuration</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">scs_5.1</category>
      <category domain="http://communities.intel.com/community/openportit/vproexpert/blog/tags">server_script</category>
      <category domain="http://communities.intel.com/community/openportit/vproexpert/blog/tags">provisioning_script</category>
      <category domain="http://communities.intel.com/community/openportit/vproexpert/blog/tags">scs_settings</category>
      <category domain="http://communities.intel.com/community/openportit/vproexpert/blog/tags">scs_db</category>
      <category domain="http://communities.intel.com/community/openportit/vproexpert/blog/tags">activator_utility</category>
      <category domain="http://communities.intel.com/community/openportit/vproexpert/blog/tags">configuration</category>
      <pubDate>Wed, 15 Apr 2009 11:42:48 GMT</pubDate>
      <author>tal.elgar@intel.com</author>
      <guid>http://communities.intel.com/community/openportit/vproexpert/blog/2009/04/15/which-scs-service-setting-to-go-for--script-or-from-db-everything-you-ever-wanted-to-know</guid>
      <dc:date>2009-04-15T11:42:48Z</dc:date>
      <clearspace:dateToText>7 months, 2 weeks ago</clearspace:dateToText>
      <wfw:comment>http://communities.intel.com/community/openportit/vproexpert/blog/comment/which-scs-service-setting-to-go-for--script-or-from-db-everything-you-ever-wanted-to-know</wfw:comment>
      <wfw:commentRss>http://communities.intel.com/community/openportit/vproexpert/blog/feeds/comments?blogPost=12059</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:485ebb0c-deb8-4a8a-98e9-8d8178d8efcb] --&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:485ebb0c-deb8-4a8a-98e9-8d8178d8efcb] --&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>
    <item>
      <title>Powershell: Enabling auto-provisioning on SCCM client</title>
      <link>http://communities.intel.com/community/openportit/vproexpert/blog/2009/02/16/powershell-enabling-auto-provisioning-on-sccm-client</link>
      <description>&lt;!-- [DocumentBodyStart:3ad502e5-3c45-4435-8eab-5b5947805ee9] --&gt;&lt;div class='jive-rendered-content'&gt;&lt;p&gt;Hello!&lt;/p&gt;&lt;p style="min-height: 8pt; height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;Have you ever run into the situation where you want to enable the auto-provisioning policy for a ConfigMgr client, but dont' want to wait for the policy to filter down to the client? If you're like me, then you would answer with a hearty "&lt;em&gt;yes&lt;/em&gt;." Thankfully, I've got a method for you to force an SCCM client to enable auto-provisioning, &lt;span style="text-decoration: underline;"&gt;without&lt;/span&gt; relying on the collection setting!&lt;/p&gt;&lt;p style="min-height: 8pt; height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;Keep in mind that, for some odd reason, pasting this code into a Powershell window will probably fail. Instead, paste the first 4 lines, and manually type out the last (red) line.&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;"&gt;$OobSettings =  [wmiclass]”root\ccm\policy\machine\actualconfig:CCM_OutOfBandManagementSettings”&lt;/span&gt;&lt;br/&gt;&lt;span style="font-family: courier new;"&gt;$OobSettingsInstance =  $OobSettings.CreateInstance()&lt;/span&gt;&lt;br/&gt;&lt;span style="font-family: courier new;"&gt;$OobSettingsInstance.AutoProvision =  $True&lt;/span&gt;&lt;br/&gt;&lt;span style="font-family: courier new;"&gt;$OobSettingsInstance.SiteSettingsKey =  1&lt;/span&gt;&lt;br/&gt;&lt;span style="color: #993300;"&gt;&lt;span style="font-family: courier new;"&gt;$OobSettingsInstance.Put()&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;Basically what this does is spawn an instance of the &lt;em&gt;CCM_OutOfBandManagementSettings&lt;/em&gt; WMI class, sets two properties on it, and then writes it back to the system. This should enable auto-provisioning &lt;strong&gt;immediately&lt;/strong&gt; so you don't have to wait! &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:3ad502e5-3c45-4435-8eab-5b5947805ee9] --&gt;</description>
      <category domain="http://communities.intel.com/community/openportit/vproexpert/blog/tags">script</category>
      <category domain="http://communities.intel.com/community/openportit/vproexpert/blog/tags">administrate</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">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">configmgr</category>
      <category domain="http://communities.intel.com/community/openportit/vproexpert/blog/tags">sccm</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>
      <pubDate>Tue, 17 Feb 2009 05:01:39 GMT</pubDate>
      <author>pcgeek86@gmail.com</author>
      <guid>http://communities.intel.com/community/openportit/vproexpert/blog/2009/02/16/powershell-enabling-auto-provisioning-on-sccm-client</guid>
      <dc:date>2009-02-17T05:01:39Z</dc:date>
      <clearspace:dateToText>9 months, 2 weeks ago</clearspace:dateToText>
      <wfw:comment>http://communities.intel.com/community/openportit/vproexpert/blog/comment/powershell-enabling-auto-provisioning-on-sccm-client</wfw:comment>
      <wfw:commentRss>http://communities.intel.com/community/openportit/vproexpert/blog/feeds/comments?blogPost=11892</wfw:commentRss>
    </item>
    <item>
      <title>Stepping through vPro / Powershell code</title>
      <link>http://communities.intel.com/community/openportit/vproexpert/blog/2008/12/03/stepping-through-vpro-powershell-code</link>
      <description>&lt;!-- [DocumentBodyStart:57e403f5-0c2b-4ced-a245-fe5298eac47b] --&gt;&lt;div class='jive-rendered-content'&gt;&lt;p&gt;Hello vPro community!&lt;/p&gt;&lt;p style="min-height: 8pt; height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;I rather quickly posted the Powershell code I got functioning yesterday just to make sure that I didn't forget to post it at some point, but if you're new to Powershell, you might not understand everything that's going on here. If I left your head spinning, then I apologize, but tonight, I'm wrapping back around to help describe to you the thought process behind the script I posted! &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;On top of that, once I put together some notes from earlier today, I will post later on about some of my newest findings! To give you a teaser, I found a method of setting AMT power profiles using Powershell code! I'll be sure to get this posted as soon as I can, but for now, I think it would be most beneficial to understand the basics of connecting to a vPro system.&lt;/p&gt;&lt;p style="min-height: 8pt; height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;I'm going to step through the script line-by-line and leave some comments about each of them. Comments will be denoted by lines beginning with a pound sign (#). This is because Powershell uses this character as a "comment" character.&lt;/p&gt;&lt;p style="min-height: 8pt; height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;If you're experienced with .NET, then you'll probably either already know about, or want to get familiar with, the tool known as the &lt;a class="jive-link-external-small" href="http://www.red-gate.com/products/reflector/"&gt;.NET Reflector&lt;/a&gt;. This utility allows you to "reflect" over a .NET library, and discover the objects, methods, and properties that are available to you to use in your Powershell scripts. It's not always a simple task to figure out how to use .NET objects, especially if there is either poor documentation, or none at all, but this tool definitely makes it easier.&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;# The following 6 lines are simply variables that we are setting&lt;/p&gt;&lt;p&gt;# to make troubleshooting and customizing our script easier.&lt;/p&gt;&lt;p&gt;# We will be instantiating (creating) an object of the data type&lt;/p&gt;&lt;p&gt;# "AmtSystem" that requires these values as params to its&lt;/p&gt;&lt;p&gt;# constructor method.&lt;/p&gt;&lt;p style="min-height: 8pt; height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;# This is the domain\userID we want to authenticate as&lt;/p&gt;&lt;p&gt;&lt;span style="color: #008080;"&gt;$amtusername = "vprodemo\DomainUser"&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;# This is the password for the user account to authenticate&lt;br/&gt;&lt;span style="color: #008080;"&gt;$amtpassword = "P@SSW0Rd"&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;# This is the FQDN of the vPro client system we want to connect to&lt;br/&gt;&lt;span style="color: #008080;"&gt;$amthostname = "vproclient.vprodemo.com"&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;# This is the TCP port that we want to connect to the vPro client on&lt;/p&gt;&lt;p&gt;# TCP 16993 is used for TLS communications to AMT clients&lt;/p&gt;&lt;p&gt;&lt;span style="color: #008080;"&gt;$amtport = 16993&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;# This parameter determines whether or not your password is&lt;/p&gt;&lt;p&gt;# saved in the AmtSystem object (I think)&lt;br/&gt;&lt;span style="color: #008080;"&gt;$amtrecallpassword = $false&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;# I haven't verified this, but I believe that this parameter determines&lt;/p&gt;&lt;p&gt;# whether or not WS-MAN is used exclusively on vPro clients&lt;/p&gt;&lt;p&gt;# that support it. Otherwise, it will attempt to use EOI (SOAP).&lt;br/&gt;&lt;span style="color: #008080;"&gt;$amtwebservicesonly = $false&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;# Next, this variable stores the path to the "Manageability Stack.dll"&lt;/p&gt;&lt;p&gt;# which is included with the Intel AMT Developer Toolkit (DTK).&lt;/p&gt;&lt;p&gt;# Be sure to download the latest version from the &lt;a class="jive-link-external-small" href="http://www.intel.com/software/amt-dtk/"&gt;Intel website&lt;/a&gt;.&lt;/p&gt;&lt;p&gt;# This DLL is a .NET library, written in C#, that provides an API&lt;/p&gt;&lt;p&gt;# to interact with Intel vPro clients.&lt;/p&gt;&lt;p&gt;&lt;span style="color: #008080;"&gt;$manageabilitystack = "C:\Program Files\Intel\Manageability Developer Tool Kit\0.6.08325.2\Manageability Stack.dll"&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;# This line uses the built-in Assembly class (part of .NET reflection)&lt;/p&gt;&lt;p&gt;# to load the .NET DLL containing the AMT API. The Out-Null Powershell&lt;/p&gt;&lt;p&gt;# cmdlet is used to suppress any console output of the LoadFile() method.&lt;/p&gt;&lt;p&gt;&lt;span style="color: #008080;"&gt;[System.Reflection.Assembly]::LoadFile("$ManageabilityStack") | Out-Null&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 Write-Host cmdlet is built into Powershell and simply writes&lt;/p&gt;&lt;p&gt;# some text to the console. We are using inline variables to dynamically&lt;/p&gt;&lt;p&gt;# display the information about the client we're connecting to.&lt;/p&gt;&lt;p&gt;&lt;span style="color: #008080;"&gt;Write-Host "Connecting to $amthostname on port $amtport"&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;# This is the line that's actually getting the object that we will use to&lt;/p&gt;&lt;p&gt;# reference our target Intel AMT client. We are creating a global variable&lt;/p&gt;&lt;p&gt;# name "amtdevice" and setting its value to a "New-Object" of datatype&lt;/p&gt;&lt;p&gt;# ManageabilityStack.AmtSystem (you can use .NET Reflector to find this)&lt;/p&gt;&lt;p&gt;# and then passing the parameters that we defined before to its constructor.&lt;/p&gt;&lt;p&gt;# &lt;strong&gt;If the below line wraps in your browser, please be sure to put it all on one line in your script.&lt;/strong&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="color: #008080;"&gt;$global:amtdevice = New-Object ManageabilityStack.AmtSystem -ArgumentList $amthostname,$amtport,$amtusername,$amtpassword,$amtrecallpassword,$amtwebservicesonly&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;Footnote&lt;/span&gt;&lt;/strong&gt;: With respect to variable scope in Powershell, the reason I am&lt;/p&gt;&lt;p&gt;# defining this as a global variable explicitly, is because if you copy and paste&lt;/p&gt;&lt;p&gt;# this code into a script, and then run that script from within an interactive&lt;/p&gt;&lt;p&gt;# Powershell session, the $amtdevice will now be defined as global to the session&lt;/p&gt;&lt;p&gt;# and will not be deleted when the script exits. This allows you to run the script to&lt;/p&gt;&lt;p&gt;# retrieve the device object, but then continue to work with it interactively once&lt;/p&gt;&lt;p&gt;# the connection is established!&lt;/p&gt;&lt;p style="min-height: 8pt; height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;# Tell the AmtSystem object that we want to use TLS&lt;/p&gt;&lt;p&gt;&lt;span style="color: #008080;"&gt;$amtdevice.UseTls = $true&lt;/span&gt;&lt;/p&gt;&lt;p&gt;# Enable WS-MAN support (if available) on the connection&lt;br/&gt;&lt;span style="color: #008080;"&gt;$amtdevice.WsManSupport = $true&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;# Once we've set up all of our configuration options about the connection,&lt;/p&gt;&lt;p&gt;# this next line actually establishes the connection.&lt;/p&gt;&lt;p&gt;&lt;span style="color: #008080;"&gt;$amtdevice.Connect()&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 "State" property of the AmtSystem object is "Connecting" until the&lt;/p&gt;&lt;p&gt;# connection either succeeds or fails. We want to monitor the status until&lt;/p&gt;&lt;p&gt;# this occurs.&lt;/p&gt;&lt;p&gt;&lt;span style="color: #008080;"&gt;while ($amtdevice.State -eq "Connecting") { Start-Sleep 1 }&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;# Finally, once the connection either succeeds or fails, we write out the&lt;/p&gt;&lt;p&gt;# State property to the console so that we know what the outcome was.&lt;/p&gt;&lt;p&gt;&lt;span style="color: #008080;"&gt;Write-Host "AMT device is in state $($amtdevice.State.ToString())"&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;/p&gt;&lt;p style="min-height: 8pt; height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;So, there you have it. That is the code, with my comments inline. If you have any questions or feedback on my articles, please feel free to comment on this blog article. I will try my best to answer them, although please understand that I am still working on comprehending this great API! &lt;img height="16px" src="http://communities.intel.com/images/emoticons/happy.gif" width="16px"/&gt; If this is useful to any of you, I would like to know that, and if not, then please recommend something that you would like to hear about!&lt;/p&gt;&lt;p style="min-height: 8pt; height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;As promised, I will eventually write another follow-up article on how you can set Management Engine (ME) &lt;span style="text-decoration: underline;"&gt;power profiles&lt;/span&gt; on a provisioned AMT client remotely, using Powershell! Until next time ...&lt;/p&gt;&lt;p style="min-height: 8pt; height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;Happy Powershell Scripting!!&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: #999999;"&gt;&lt;strong&gt;Trevor Sullivan&lt;/strong&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="color: #999999;"&gt;&lt;em&gt;Systems Engineer&lt;/em&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="color: #999999;"&gt;OfficeMax Corporation&lt;/span&gt;&lt;/p&gt;&lt;/div&gt;&lt;!-- [DocumentBodyEnd:57e403f5-0c2b-4ced-a245-fe5298eac47b] --&gt;</description>
      <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>
      <category domain="http://communities.intel.com/community/openportit/vproexpert/blog/tags">1.0</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">intel</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">amt</category>
      <category domain="http://communities.intel.com/community/openportit/vproexpert/blog/tags">firmware</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">automate</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">administrate</category>
      <category domain="http://communities.intel.com/community/openportit/vproexpert/blog/tags">administrative</category>
      <category domain="http://communities.intel.com/community/openportit/vproexpert/blog/tags">deployment</category>
      <category domain="http://communities.intel.com/community/openportit/vproexpert/blog/tags">configure</category>
      <category domain="http://communities.intel.com/community/openportit/vproexpert/blog/tags">manage</category>
      <category domain="http://communities.intel.com/community/openportit/vproexpert/blog/tags">standardize</category>
      <pubDate>Thu, 04 Dec 2008 01:21:45 GMT</pubDate>
      <author>pcgeek86@gmail.com</author>
      <guid>http://communities.intel.com/community/openportit/vproexpert/blog/2008/12/03/stepping-through-vpro-powershell-code</guid>
      <dc:date>2008-12-04T01:21:45Z</dc:date>
      <clearspace:dateToText>12 months, 2 hours ago</clearspace:dateToText>
      <wfw:comment>http://communities.intel.com/community/openportit/vproexpert/blog/comment/stepping-through-vpro-powershell-code</wfw:comment>
      <wfw:commentRss>http://communities.intel.com/community/openportit/vproexpert/blog/feeds/comments?blogPost=11744</wfw:commentRss>
    </item>
  </channel>
</rss>

