*****************************************

All Intel-provided code snippets in or attached to this blog are provided under the Intel Software Community License unless otherwise specified.

 

Any user submitted code or materials posted on this blog is supplied under license from the submitter, and should be used or downloaded in accordance with any license terms specified. Intel is not responsible for user submitted code nor warrants that it will work correctly.  If no license is provided, you should contact the submitter.

*****************************************

 

 

 

So I have been using the Intel Setup and Configuration Software to manage my vPro AMT clients in my test network. I have to admit it is quite nice to have things just work when I want to setup and configure Intel vPro AMT.

 

But how do I manage those systems? Come on – you know me…I use the Intel vPro Technology Module for PowerShell. I helped make it.

 

So then the question becomes, how do I get a list of configured computers from the SCS Database? Well, the SCS includes a WMI interface to the data. Great! Now I just need to make a couple wmi calls. And thanks to all the built in PowerShell WMI goodness, those calls are pretty easy.

 

All my clients are in my network subdomain domain “ent.vprodemo”. I also have an RCS server setup. My credentials I am storing in $cred, and the server’s IP address is stored in $ServerIP.

 

So here is a sample script that gets all the AMT system Full Qualified domain names and sends them to invoke-amtgui.ps1:

 

$computerList = @()

$query = "SELECT * FROM RCS_AMT"

 

$output = Get-WMIObject -computername $serverIP -credential $cred -namespace "root/Intel_RCS_Systems" –query $query -authentication PacketPrivacy

 

foreach ($item in $output)

{

                $computerList += $item.AMTfqdn

}

 

invoke-amtgui $computerList -credential $cred

 

If doesn't have to be invoke-amtgui - you could send all the machine to invoke-amtpowermanagement just as easily.

 

Of course, we could use the IP address as well by using the following line:

$computerList += $item.AMTIPv4

 

invoke-amtgui.png

 

Want to see what else is available? Just write-host $output. Here are the results from one of the systems:

 

You can see the name, AD OU, AMT version, managed state, LOTs of stuff. Awesome!

 

wmiobject.PNG

 

In my environment I am using Kerberos, so authentication is covered. But what happens if your environment uses digest credentials? Well, you can use WMI to ask for the digest admin password on a machine:

 

$output = invoke-WMIMethod -computername $serverIP -credential $cred -Namespace "root/Intel_RCS_Systems" -class "RCS_Systems_RemoteConfigurationService" -name GetConfiguredPassword -authentication PacketPrivacy -argumentlist $FQDN, $IPAddress, $true, $UUID

 

$output.Password

 

The WMI interface checks with the machine by logging into it to ensure that it returns the correct password to you. So if the machine is not available you will not be able to get the password. But that is ok since you could not manage it anyways.

 

How do you get the $UUID and $FQDN? From that WQL query we made earlier –

 

$query = "SELECT * FROM RCS_AMT"

 

Just make sure you grab the data you need:

        $FQDN = $item.AMTfqdn

$uuid = $ item.name

$AMTIPv4 = $ item.AMTIPv4