<?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>Tue, 17 Feb 2009 05:01:39 GMT</pubDate>
    <generator>Clearspace 2.5.9 (http://jivesoftware.com/products/clearspace/)</generator>
    <dc:date>2009-02-17T05:01:39Z</dc:date>
    <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:82460342-df65-4b73-8dd6-de466ce9230a] --&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:82460342-df65-4b73-8dd6-de466ce9230a] --&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>Setting Power Policies in Windows Powershell</title>
      <link>http://communities.intel.com/community/openportit/vproexpert/blog/2008/12/08/setting-power-policies-in-windows-powershell</link>
      <description>&lt;!-- [DocumentBodyStart:60498ebb-1fdf-4417-b7e1-62a4b232d8e9] --&gt;&lt;div class='jive-rendered-content'&gt;&lt;p&gt;Hello Intel 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'm going to talk to you today a little bit about how to use Windows Powershell to set Intel vPro power profiles. I'll provide a quick bit of background first on what power profiles are, and &lt;strong&gt;why&lt;/strong&gt; you'd want to be able to set them with Powershell.&lt;/p&gt;&lt;p style="min-height: 8pt; height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;Intel vPro power profiles are nothing more than a setting in the Management Engine that tells the AMT chip when to be powered up, and when not to be powered up. In some cases, you may want vPro to be inactive during sleep states, or after the computer has lost power (eg. UPS failure).&lt;/p&gt;&lt;p style="min-height: 8pt; height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;In my case however, I want vPro to be always active. This is problematic, because Microsoft Configuration Manager's implementation of a provisioning server doesn't give you the option of setting the active power profile. Instead, during provisioning, ConfigMgr sets the active profile to whatever index "5" is. You'll actually see this in the &lt;em&gt;amtopmgr.log&lt;/em&gt; file on your OOB (Out-Of-Band) service point during the provisioning process.&lt;/p&gt;&lt;p style="min-height: 8pt; height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;Because ConfigMgr decides the default power profile during provisioning, I've decided that I wanted to change it. Because Windows Powershell is an &lt;em&gt;awesome&lt;/em&gt; automation tool, and because Intel's AMT Developer Toolkit (DTK) offers a .NET library that I can use in Powershell, I figured that I would figure out how to do it!&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;You might remember my last post on how to use Powershell to connect to an AMT device. The process basically involves loading the aforementioned .NET DLL from the DTK, and then establishing a connection to the device. I didn't really get the opportunity to show you how to do a whole lot with it after making the connection though, so that's the purpose of this post! Let's go ahead and take a look at a few lines of Powershell code, so you can understand the retrieval, and setting of power profiles.&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;# In my last Powershell script, I used the $amtdevice variable&lt;/p&gt;&lt;p&gt;# to reference the &lt;em&gt;AmtSystem&lt;/em&gt; .NET object. We'll assume at this point&lt;/p&gt;&lt;p&gt;# that you have already connected to the AMT device based&lt;/p&gt;&lt;p&gt;# on my last article.&lt;/p&gt;&lt;p&gt;&lt;span style="color: #008080;"&gt;$amtdevice&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;# By using the .NET Reflector tool, we can see that the &lt;em&gt;AmtSystem&lt;/em&gt;&lt;/p&gt;&lt;p&gt;# object has a property called &lt;em&gt;SecurityAdmin&lt;/em&gt;, which returns an &lt;em&gt;AmtSecurityAdmin&lt;/em&gt;&lt;/p&gt;&lt;p&gt;# object.&lt;/p&gt;&lt;p&gt;&lt;span style="color: #008080;"&gt;$AmtSecAdmin = $AmtDevice.SecurityAdmin&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 &lt;em&gt;AmtSecurityAdmin&lt;/em&gt; object has a method called &lt;em&gt;GetPowerPackages&lt;/em&gt;().&lt;/p&gt;&lt;p&gt;# After examining this data type in .NET Reflector, we can filter for only the two&lt;/p&gt;&lt;p&gt;# properties we want to see, the profile &lt;em&gt;ID&lt;/em&gt;, and its &lt;em&gt;Name&lt;/em&gt;. We'll use the Powershell&lt;/p&gt;&lt;p&gt;# &lt;em&gt;Select-Object&lt;/em&gt; cmdlet to filter this data.&lt;/p&gt;&lt;p&gt;&lt;span style="color: #008080;"&gt;$AmtSecAdmin.GetPowerPackages() | Select-Object -Property ID,Name&lt;/span&gt;&lt;/p&gt;&lt;p&gt;# You should get some output looking something like this:&lt;/p&gt;&lt;p&gt;# 12834f94-10fb-dc4f-968e-1e232b0c9065         Desktop: ON in S0&lt;br/&gt;# ab0086a1-7f9a-424c-a6e6-bb243a295d9e         Desktop: ON in S0, S3&lt;br/&gt;# acab8672-b496-e248-9b9e-9b7df91c7fd4         Desktop: ON in S0, S3, S4-5&lt;br/&gt;# 4dcd327b-be6b-8943-a62a-4d7bd8dbd026         Desktop: ON in S0, ME Wake in S3&lt;br/&gt;# 46732273-dc23-2f43-a98a-13d37982d855         Desktop: ON in S0, ME Wake in S3, S4-5&lt;br/&gt;# baa419c5-6f6e-4d8d-b227-517f7e4595db         Desktop: ON in S0, S3, S4-5, OFF After Power Loss&lt;br/&gt;# ede30bd6-c504-462c-b772-d18018ee2fc4         Desktop: ON in S0, ME Wake in S3, S4-5, Off After Power Loss&lt;/p&gt;&lt;p style="min-height: 8pt; height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;# Once we have a listing of the power profiles available on the AMT device&lt;/p&gt;&lt;p&gt;# we can get the one that we want, and then set it. Since I always want my&lt;/p&gt;&lt;p&gt;# AMT device active, no matter the system's power state, I'm going to choose&lt;/p&gt;&lt;p&gt;# "&lt;em&gt;Desktop: ON in S0, S3, S4-5&lt;/em&gt;" which is index 2 (in a zero-based collection).&lt;/p&gt;&lt;p&gt;&lt;span style="color: #008080;"&gt;$TargetPowerProfile = ($AmtSecAdmin.GetPowerPackages())[2]&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;# Now that I have a variable referencing the target power profile, I will set the&lt;/p&gt;&lt;p&gt;# profile on the AMT device. The AmtSecurityAdmin object has a method called&lt;/p&gt;&lt;p&gt;# &lt;em&gt;SetActivePowerPackage&lt;/em&gt;() that takes one parameter: the power profile we have&lt;/p&gt;&lt;p&gt;# a reference to.&lt;/p&gt;&lt;p&gt;&lt;span style="color: #008080;"&gt;$AmtResult = $AmtSecAdmin.SetActivePowerPackage($TargetPowerProfile)&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="color: #008080;"&gt;"Setting power profile to $($TargetPowerProfile.Name) resulted in $AmtResult!"&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;##### End Setting Power Profile #####&lt;/p&gt;&lt;p style="min-height: 8pt; height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;# Let's also take a quick look at how to get some basic information about&lt;/p&gt;&lt;p&gt;# the AMT device's provisioning data. We can figure out if IDE-R, SoL, and the&lt;/p&gt;&lt;p&gt;# WebUI are enabled. We'll use the &lt;em&gt;AmtGeneralInfo&lt;/em&gt; object for this.&lt;/p&gt;&lt;p style="min-height: 8pt; height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;# Get a reference to the &lt;em&gt;AmtGeneralInfo&lt;/em&gt; object&lt;/p&gt;&lt;p&gt;&lt;span style="color: #008080;"&gt;$AmtInfo = $amtdevice.Info&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;# Write out the current configuration settings&lt;/p&gt;&lt;p&gt;&lt;span style="color: #008080;"&gt;"SOL Enabled: $AmtInfo.SerialOverLanEnabled"&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="color: #008080;"&gt;"IDE-R Enabled: $AmtInfo.IdeRedirectEnabled"&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="color: #008080;"&gt;"WebUI Enabled: $AmtInfo.WebUiEnabled"&lt;/span&gt;&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 this helps get you on your way to doing some cool Powershell / vPro automation! Let me know whether or not this helps you in your endeavors &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:60498ebb-1fdf-4417-b7e1-62a4b232d8e9] --&gt;</description>
      <category domain="http://communities.intel.com/community/openportit/vproexpert/blog/tags">configmgr</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">system</category>
      <category domain="http://communities.intel.com/community/openportit/vproexpert/blog/tags">center</category>
      <category domain="http://communities.intel.com/community/openportit/vproexpert/blog/tags">saver</category>
      <category domain="http://communities.intel.com/community/openportit/vproexpert/blog/tags">configuration</category>
      <category domain="http://communities.intel.com/community/openportit/vproexpert/blog/tags">standardize</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">manager</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">2007</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">amt</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">administrate</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">sccm</category>
      <category domain="http://communities.intel.com/community/openportit/vproexpert/blog/tags">sccm_sp1</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">manage</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">automation</category>
      <category domain="http://communities.intel.com/community/openportit/vproexpert/blog/tags">scripting</category>
      <category domain="http://communities.intel.com/community/openportit/vproexpert/blog/tags">time</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">tools</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">intel</category>
      <pubDate>Tue, 09 Dec 2008 02:03:20 GMT</pubDate>
      <author>pcgeek86@gmail.com</author>
      <guid>http://communities.intel.com/community/openportit/vproexpert/blog/2008/12/08/setting-power-policies-in-windows-powershell</guid>
      <dc:date>2008-12-09T02:03:20Z</dc:date>
      <clearspace:dateToText>11 months, 3 weeks ago</clearspace:dateToText>
      <wfw:comment>http://communities.intel.com/community/openportit/vproexpert/blog/comment/setting-power-policies-in-windows-powershell</wfw:comment>
      <wfw:commentRss>http://communities.intel.com/community/openportit/vproexpert/blog/feeds/comments?blogPost=11748</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:0dd1bcd4-fed9-4699-9df1-03a05810ed71] --&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:0dd1bcd4-fed9-4699-9df1-03a05810ed71] --&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, 14 minutes 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>
    <item>
      <title>Intel AMT, Windows Powershell, and You</title>
      <link>http://communities.intel.com/community/openportit/vproexpert/blog/2008/12/02/intel-amt-windows-powershell-and-you</link>
      <description>&lt;!-- [DocumentBodyStart:66e8ea3e-59a0-473d-977d-6aac0e66ad29] --&gt;&lt;div class='jive-rendered-content'&gt;&lt;p&gt;Hello everyone!&lt;/p&gt;&lt;p style="min-height: 8pt; height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;I have been working on understanding the Intel AMT Developer's Toolkit (DTK) so that I can begin developing some custom tools around Intel vPro. One of the tools that I am planning on working with is Microsoft's Windows Powershell. Windows Powershell is a very powerful, object-oriented command-line replacement for Windows XP, Vista, 2003, and 2008. It's an administrative scripting language that is significantly more powerful than VBscript, and has the entire power of the Microsoft .NET Platform behind it.&lt;/p&gt;&lt;p style="min-height: 8pt; height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;Just today, I've had my first success in using the Intel DTK with Windows Powershell, in my quest to automate Intel vPro related tasks using Powershell!&lt;/p&gt;&lt;p style="min-height: 8pt; height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;This is some &lt;strong&gt;really&lt;/strong&gt; cool stuff, and I just had to get it out there to share with the community. I can't wait to see what else people build off of this!&lt;/p&gt;&lt;p style="min-height: 8pt; height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;Here is the first sample code that I've gotten to function correctly. I'm using it against a Dell Optiplex 755 running AMT firmware version 3.2.1, which was provisioned through ConfigMgr SP1.&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;&lt;span style="font-family: courier new,courier;"&gt;$amtusername = "vprodemo\DomainUser"&lt;br/&gt;$amtpassword = "P@SSW0Rd"&lt;br/&gt;$amthostname = "vproclient.vprodemo.local"&lt;br/&gt;$amtport = 16993&lt;br/&gt;$amtrecallpassword = $false&lt;br/&gt;$amtwebservicesonly = $false&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-family: courier new,courier;"&gt;&lt;br/&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-family: courier new,courier;"&gt;$manageabilitystack = "C:\Program Files\Intel\Manageability Developer Tool Kit\Manageability Stack.dll"&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-family: courier new,courier;"&gt;&lt;br/&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-family: courier new,courier;"&gt;[System.Reflection.Assembly]::LoadFile("$ManageabilityStack") | Out-Null&lt;br/&gt;Write-Host "Connecting to $amthostname on port $amtport"&lt;br/&gt;$amtdevice = New-Object ManageabilityStack.AmtSystem $amthostname,$amtport,$amtusername,$amtpassword,$amtrecallpassword,$amtwebservicesonly&lt;br/&gt;$amtdevice.UseTls = $true&lt;br/&gt;$amtdevice.WsManSupport = $true&lt;br/&gt;Write-Host "TLS: $($amtdevice.UseTls), WsMan Support: $($amtdevice.WsManSupport)"&lt;br/&gt;$amtdevice.Connect()&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-family: courier new,courier;"&gt;&lt;br/&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-family: courier new,courier;"&gt;while ($amtdevice.State -eq "Connecting")&lt;br/&gt;{&lt;br/&gt;    Start-Sleep 1&lt;br/&gt;}&lt;br/&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;Unfortunately that's all I can post for now, but I definitely plan on continuing work on this development!&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:66e8ea3e-59a0-473d-977d-6aac0e66ad29] --&gt;</description>
      <category domain="http://communities.intel.com/community/openportit/vproexpert/blog/tags">administrator</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">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">scripting</category>
      <category domain="http://communities.intel.com/community/openportit/vproexpert/blog/tags">development</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">amt</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">configmgr</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">engineer</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">manage</category>
      <category domain="http://communities.intel.com/community/openportit/vproexpert/blog/tags">administrate</category>
      <pubDate>Wed, 03 Dec 2008 03:36:40 GMT</pubDate>
      <author>pcgeek86@gmail.com</author>
      <guid>http://communities.intel.com/community/openportit/vproexpert/blog/2008/12/02/intel-amt-windows-powershell-and-you</guid>
      <dc:date>2008-12-03T03:36:40Z</dc:date>
      <clearspace:dateToText>12 months, 21 hours ago</clearspace:dateToText>
      <clearspace:replyCount>3</clearspace:replyCount>
      <wfw:comment>http://communities.intel.com/community/openportit/vproexpert/blog/comment/intel-amt-windows-powershell-and-you</wfw:comment>
      <wfw:commentRss>http://communities.intel.com/community/openportit/vproexpert/blog/feeds/comments?blogPost=11738</wfw:commentRss>
    </item>
  </channel>
</rss>

