Intel vPro® Platform
Intel Manageability Forum for Intel® EMA, AMT, SCS & Manageability Commander
2917 Discussions

Getting AMT Powerstate with powershell module not working as expected

Massive
Beginner
3,230 Views

Hello,

I've been trying to fetch power-states for our AMT enabled systems, and this functionality seems to be broken. At first I thought it was an issue with a new release of Intel VPro Powershell module, but I went back several editions and the same issue occured. 


I went through the Get-AMTPowerState.ps1 script line by line to identify where it fails, and it appears to be when fetching IPS Power management information:

 

#Get IPS Power Management Service - data is held here.
$IPS_PowerManagementServiceRef=$Connection.NewReference("IPS_PowerManagementService")
$PowerMgmtItem=$IPS_PowerManagementServiceRef.Enumerate("http://schemas.dmtf.org/wbem/wsman/1/wsman", $null).Next()

The issue appears to be this specific call:

"$IPS_PowerManagementServiceRef.Enumerate("http://schemas.dmtf.org/wbem/wsman/1/wsman", $null).Next()"

It throws the following error: 
Exception calling "Enumerate" with "2" argument(s): "No route can be determined to reach the destination role defined by the WSAddressing To."
At line:1 char:1
+ $PowerMgmtItem = $IPS_PowerManagementServiceRef.Enumerate("http://sch ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : NotSpecified: (:) [], MethodInvocationException
+ FullyQualifiedErrorId : WsmanUnreachableException


The data from http://schemas.dmtf.org/wbem/wsman/1/wsman no longer exists:

"The requested URL /wbem/wsman/1/wsman was not found on this server."

0 Kudos
11 Replies
SergioS_Intel
Moderator
3,209 Views

 Hello Massive,

 

 Thank you for contacting Intel Customer Support.

 

 Can you please provide us with the steps that you are following in order to run the commands?

  

 Also can you please let us know if you were getting the error before?

   

 Best regards,

 Sergio S.

 Intel Customer Support Technician

  


0 Kudos
Massive
Beginner
3,184 Views

As mentioned, the error did not occur around 2-3 months ago (not sure exactly).


The error occurs when running Get-AMTPowerstate from the IntelVPro powershell module.

 

Get-AMTPowerState hostname -Credential $amtcred

Computer Name Power State Description Reason
------------- ----------------------- ------
hostname Cannot connect Exception calling "Enumerate" with "2" argument(s): "No route can be determine...

 

Writing exactly what steps I performed to track down where the error lies will take too much time, so I'll sum it up:

Create a connection object:

$Connection = New-Object Intel.Management.Wsman.WsmanConnection

Fill it with required data (hostname, credentials, port number)

When the script calls adding a new reference to IPS_PowerManagementService, then enumerating from the schemas.dmtf.org site, it fails. The error outputted when it attempts the enumeration, provides the exact same error as when just trying to run the Get-AMTPowerState command. 

The only reason I can think of is that the linked site 'http://schemas.dmtf.org/wbem/wsman/1/wsman' errors out if you attempt to visit it, it no longer exists.
The only data it holds are power-state descriptions. 

So, I modified the Get-AMTPowerState script to verify that the issue was as I suspected; by uncommenting all references to Powerstate descriptions being fetched from the schema site (Uncommenting the following lines in the script):

Line 123-142, 147-148 

And then running it again, no error occurs:

Get-AMTPowerState hostname -Credential $amtcred

Computer Name Power State ID Power State Description
------------- -------------- -----------------------
hostname 2 On (S0)

 

As you can see, it manages to connect to the AMT device just fine and grabs the power state of it, but is missing the descriptions of the power states. 

 

 

0 Kudos
SergioS_Intel
Moderator
3,175 Views

Hello Massive,

 

Thank you for the additional information, please allow us to check it and we will get back to you.

   

 Best regards,

 Sergio S.

 Intel Customer Support Technician


0 Kudos
SergioS_Intel
Moderator
3,154 Views

Hello Massive,


In order to continue assisting you with your case please help us by providing the information:


What is the deployment size?


Are you using any provisioning tools? i.e. Intel EMA, mesh commander, etc.


Is the issue happening on different AMT versions?


What is the AMT version that is presenting the issue?


What tool are you using to run the set of commands?

 

 We will be looking forward to your updates.

 

 

 Best regards,

 Sergio S.

 Intel Customer Support Technician


0 Kudos
Massive
Beginner
3,141 Views

These questions looks like a script I need to fill in but are irrelevant to the issue described. 

 

What is the deployment size? - Irrelevant to the issue described, but our site is ~1200 machines. 

 

Are you using any provisioning tools? i.e. Intel EMA, mesh commander, etc. - No. 

 

Is the issue happening on different AMT versions? - Yes, as described, the issue isn't fetching power states, the problem is that the Get-AMTPowerState powershell script tries to fetch Power description information from a website where the data no longer exists from the looks of it. 

 

What is the AMT version that is presenting the issue? All of them.

 

What tool are you using to run the set of commands? IntelVPro powershell module.

 

Please have someone test Get-AMTPowerState and see if they get similar issues. 

 

 

0 Kudos
MIGUEL_C_Intel
Moderator
3,111 Views

Hello Massive,


I hope this post finds you well.


Do you mind confirming if you are using the Intel vPro® Technology Module for Windows PowerShell version 16.0.4.1?

https://www.intel.com/content/www/us/en/download/704395/intel-vpro-technology-module-for-windows-powershell.html


I found in the guide called Intel vPro Technology Module for Windows PowerShell Installation and User Guide on page 64 section 6.11.5 a command that might help you. The guide is included in the zip file.


I look forward to hearing from you.


0 Kudos
Massive
Beginner
2,633 Views

I can confirm I'm using 16.0.4.1.

No, running Get-Help for Get-AMTPowerstate does not help with this error. 

0 Kudos
MIGUEL_C_Intel
Moderator
2,620 Views

Hello Massive,


Thank you for your update.


Do you mind sending the results of running the command Get-AMTPowerState? We want to study the outcome of the command, and the information previously provided.


I look forward to hearing from you.


0 Kudos
Massive
Beginner
2,594 Views

Get-AMTPowerState obscuredhostname -Credential $amtcred

Computer Name Power State Description Reason
------------- ----------------------- ------
obscuredhostname Cannot connect Exception calling "Enumerate" with "2" argument(s): "No route can be determine...

 

-------

 

Here's the full error message displayed:

PSMessageDetails      :
Exception             : System.Management.Automation.MethodInvocationException: Exception calling "Enumerate" with "2"
                        argument(s): "No route can be determined to reach the destination role defined by the
                        WSAddressing To." ---> Intel.Management.Wsman.WsmanUnreachableException: No route can be
                        determined to reach the destination role defined by the WSAddressing To. --->
                        System.Net.WebException: The remote server returned an error: (400) Bad Request.
                           at System.Net.HttpWebRequest.GetResponse()
                           at Intel.Management.Wsman.WsmanConnection.SendWebRequest(String msgId, XmlDocument reqDoc,
                        IManagedReference refObj, IManagedInstance input)
                           --- End of inner exception stack trace ---
                           at Intel.Management.Wsman.WsmanConnection.SendWebRequest(String msgId, XmlDocument reqDoc,
                        IManagedReference refObj, IManagedInstance input)
                           at Intel.Management.Wsman.WsmanConnection.SubmitRequest(XmlDocument reqDoc,
                        IManagedReference refObj, IManagedInstance input)
                           at Intel.Management.Wsman.ManagedReference.Enumerate(Object input, String mode)
                           at CallSite.Target(Closure , CallSite , Object , String , Object )
                           --- End of inner exception stack trace ---
                           at System.Management.Automation.ExceptionHandlingOps.CheckActionPreference(FunctionContext
                        funcContext, Exception exception)
                           at System.Management.Automation.Interpreter.ActionCallInstruction`2.Run(InterpretedFrame
                        frame)
                           at
                        System.Management.Automation.Interpreter.EnterTryCatchFinallyInstruction.Run(InterpretedFrame
                        frame)
                           at
                        System.Management.Automation.Interpreter.EnterTryCatchFinallyInstruction.Run(InterpretedFrame
                        frame)
TargetObject          :
CategoryInfo          : NotSpecified: (:) [], MethodInvocationException
FullyQualifiedErrorId : WsmanUnreachableException
ErrorDetails          :
InvocationInfo        : System.Management.Automation.InvocationInfo
ScriptStackTrace      : at Get-AMTPowerState<Process>, C:\Program
                        Files\WindowsPowerShell\Modules\IntelvProModule_16.0.4.1\Bin\IntelvPro\Get-AMTPowerState.ps1:
                        line 131
                        at <ScriptBlock>, <No file>: line 1
PipelineIterationInfo : {}

 

0 Kudos
Victor_G_Intel
Employee
2,563 Views

Hello Massive,


Thank you so much for your patience.


In this case, after analyzing your request our only and strongest recommendation is for your to get further assistance by contacting Microsoft’s support.


Best regards,


Victor G.

Intel Technical Support Technician  


0 Kudos
Massive
Beginner
2,512 Views

Hello,

 

I do not see how or why Microsoft would be able to help with an issue specific to an Intel Powershell module for VPro management.

More likely, this issue should be looked at by the developers of IntelVPro for Powershell.

 

 

0 Kudos
Reply