<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Bug on iLo connect with POSH REST? in ProLiant Servers (ML,DL,SL)</title>
    <link>https://community.hpe.com/t5/proliant-servers-ml-dl-sl/bug-on-ilo-connect-with-posh-rest/m-p/7208177#M185754</link>
    <description>&lt;P dir="auto" style="margin: 0;"&gt;Please try installing latest HPEiLOCmdlets and check&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;&lt;A href="https://support.hpe.com/connect/s/softwaredetails?softwareId=MTX_f775bbe394154fbda123632379&amp;amp;language=en_US&amp;amp;tab=revisionHistory" target="_blank"&gt;https://support.hpe.com/connect/s/softwaredetails?softwareId=MTX_f775bbe394154fbda123632379&amp;amp;language=en_US&amp;amp;tab=revisionHistory&lt;/A&gt;&lt;/P&gt;</description>
    <pubDate>Wed, 06 Mar 2024 11:40:46 GMT</pubDate>
    <dc:creator>Suvamay</dc:creator>
    <dc:date>2024-03-06T11:40:46Z</dc:date>
    <item>
      <title>Bug on iLo connect with POSH REST?</title>
      <link>https://community.hpe.com/t5/proliant-servers-ml-dl-sl/bug-on-ilo-connect-with-posh-rest/m-p/7207945#M185698</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;not shure, if this is a Bug...&lt;/P&gt;&lt;P&gt;I am collecting Powerinformation from a couple of iLos in a 5 Minute Loop. I am using an AD-Account for this. The Loop runs 3 times without any Problems. With the 4th run, the iLos start with Connection-Issues.&lt;/P&gt;&lt;BLOCKQUOTE&gt;&lt;DIV&gt;Invoke-WebRequest : The remote server returned an error: (401) Unauthorized. At C:\scripts\iLo-Scripte\draft_iLo_REST_Powerconsumtion.ps1:19 char:20 + ... $session = Invoke-WebRequest -Uri "https://$ilo/redfish/v1/Sessions" ... + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + CategoryInfo : InvalidOperation: (System.Net.HttpWebRequest:HttpWebRequest) [Invoke-WebRequest], WebException + FullyQualifiedErrorId : WebCmdletWebResponseException,Microsoft.PowerShell.Commands.InvokeWebRequestCommand&lt;/DIV&gt;&lt;/BLOCKQUOTE&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;P&gt;After this, it is not possible to connect with an AD-Account anymore. I have to Reset the iLo to make the AD-Login work again. Seems to be no Problem with an Local Account.&lt;/P&gt;&lt;P&gt;Is there any experience on this?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;$ilos @("iLo1","iLo2",...)
[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12
$bodycred = @{
        "UserName"= $ilocred.UserName
        "Password"=$ilocred.GetNetworkCredential().Password
    } | ConvertTo-Json

do{

    Write-Host "Script starts/continuing collecting $(get-date) ..."
    foreach($ilo in $ilos){        
        
        Write-Host "Collecting from $ilo..." -foregroundcolor Cyan
        $session = Invoke-WebRequest -Uri "https://$ilo/redfish/v1/Sessions" -Method Post -Body $bodycred -ContentType "application/json" 
       -UseBasicParsing 
        $AuthHeaders = @{ "X-Auth-Token" = $Session.Headers.'X-Auth-Token' }

        #Datacollection every 10 seconds from the last 5 Minnutes
        $r = @()
        $r = Invoke-WebRequest -Uri "https://$ilo/redfish/v1/chassis/1/power/fastpowermeter" -Method get -Headers $AuthHeaders - 
        ContentType "application/json"
        $powerreading = (($r.Content | ConvertFrom-Json).powerdetail) | Select-Object -Last 30 | select 
        Time,Average,CpuWatts,DimmWatts,Minimum,Peak
        $powerreading | Export-Csv c:\Temp\$($ilo)Powerreading.csv -Append -Delimiter "," -NoTypeInformation 

    }

    Write-Host "Script sleeping 5 Minutes $(get-date)..."
    sleep 300

}until ($i -eq "2")&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;POSH-Version: 5.1&lt;/P&gt;&lt;P&gt;HPEiLOCmdlets: 4.2.0.0&lt;/P&gt;&lt;P&gt;ILO-Version: iLo 5 v3.01&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 07 Mar 2024 15:52:03 GMT</pubDate>
      <guid>https://community.hpe.com/t5/proliant-servers-ml-dl-sl/bug-on-ilo-connect-with-posh-rest/m-p/7207945#M185698</guid>
      <dc:creator>Marcel_D</dc:creator>
      <dc:date>2024-03-07T15:52:03Z</dc:date>
    </item>
    <item>
      <title>Query: Bug on iLo connect with POSH REST?</title>
      <link>https://community.hpe.com/t5/proliant-servers-ml-dl-sl/bug-on-ilo-connect-with-posh-rest/m-p/7207950#M185700</link>
      <description>&lt;P style="margin: 0;"&gt;&lt;STRONG&gt;System recommended content:&lt;/STRONG&gt;&lt;/P&gt;
&lt;P style="margin: 0;"&gt;1. &lt;A href="https://hpe.to/6602Xw7Kp" target="_blank" rel="noopener"&gt;HPE iLO 6 1.57 User Guide |  Directory authentication and authorization settings in iLO&lt;/A&gt;&lt;/P&gt;
&lt;P style="margin: 0;"&gt;2. &lt;A href="https://hpe.to/6604Xw7Kq" target="_blank" rel="noopener"&gt;HPE iLO 5 3.02 User Guide |  Directory authentication and authorization settings in iLO&lt;/A&gt;&lt;/P&gt;
&lt;P style="margin: 0;"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P style="margin: 0;"&gt;Please click on "Thumbs Up/Kudo" icon to give a "Kudo".&lt;/P&gt;
&lt;P style="margin: 0;"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P style="margin: 0;"&gt;Thank you for being a HPE valuable community member.&lt;/P&gt;</description>
      <pubDate>Mon, 04 Mar 2024 11:55:21 GMT</pubDate>
      <guid>https://community.hpe.com/t5/proliant-servers-ml-dl-sl/bug-on-ilo-connect-with-posh-rest/m-p/7207950#M185700</guid>
      <dc:creator>support_s</dc:creator>
      <dc:date>2024-03-04T11:55:21Z</dc:date>
    </item>
    <item>
      <title>Re: Bug on iLo connect with POSH REST?</title>
      <link>https://community.hpe.com/t5/proliant-servers-ml-dl-sl/bug-on-ilo-connect-with-posh-rest/m-p/7207965#M185704</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;Please refer to the &lt;A href="https://support.hpe.com/hpesc/public/docDisplay?docLocale=en_US&amp;amp;docId=c04423965" target="_blank" rel="noopener"&gt;RESTful Interface Tool User Guide&lt;/A&gt; and see if it helps.&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;</description>
      <pubDate>Mon, 04 Mar 2024 14:20:03 GMT</pubDate>
      <guid>https://community.hpe.com/t5/proliant-servers-ml-dl-sl/bug-on-ilo-connect-with-posh-rest/m-p/7207965#M185704</guid>
      <dc:creator>TVVJ</dc:creator>
      <dc:date>2024-03-04T14:20:03Z</dc:date>
    </item>
    <item>
      <title>Re: Bug on iLo connect with POSH REST?</title>
      <link>https://community.hpe.com/t5/proliant-servers-ml-dl-sl/bug-on-ilo-connect-with-posh-rest/m-p/7208177#M185754</link>
      <description>&lt;P dir="auto" style="margin: 0;"&gt;Please try installing latest HPEiLOCmdlets and check&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;&lt;A href="https://support.hpe.com/connect/s/softwaredetails?softwareId=MTX_f775bbe394154fbda123632379&amp;amp;language=en_US&amp;amp;tab=revisionHistory" target="_blank"&gt;https://support.hpe.com/connect/s/softwaredetails?softwareId=MTX_f775bbe394154fbda123632379&amp;amp;language=en_US&amp;amp;tab=revisionHistory&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 06 Mar 2024 11:40:46 GMT</pubDate>
      <guid>https://community.hpe.com/t5/proliant-servers-ml-dl-sl/bug-on-ilo-connect-with-posh-rest/m-p/7208177#M185754</guid>
      <dc:creator>Suvamay</dc:creator>
      <dc:date>2024-03-06T11:40:46Z</dc:date>
    </item>
    <item>
      <title>Re: Bug on iLo connect with POSH REST?</title>
      <link>https://community.hpe.com/t5/proliant-servers-ml-dl-sl/bug-on-ilo-connect-with-posh-rest/m-p/7208288#M185784</link>
      <description>&lt;P dir="auto" style="margin: 0;"&gt;Please update&lt;/P&gt;</description>
      <pubDate>Thu, 07 Mar 2024 11:56:54 GMT</pubDate>
      <guid>https://community.hpe.com/t5/proliant-servers-ml-dl-sl/bug-on-ilo-connect-with-posh-rest/m-p/7208288#M185784</guid>
      <dc:creator>Suvamay</dc:creator>
      <dc:date>2024-03-07T11:56:54Z</dc:date>
    </item>
    <item>
      <title>Re: Bug on iLo connect with POSH REST?</title>
      <link>https://community.hpe.com/t5/proliant-servers-ml-dl-sl/bug-on-ilo-connect-with-posh-rest/m-p/7208560#M185847</link>
      <description>&lt;P&gt;I am using REST for Connecting to the iLo's. So using the newest iLo-Cmdlets isn't a helpful solution for this specific issue.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 11 Mar 2024 07:52:25 GMT</pubDate>
      <guid>https://community.hpe.com/t5/proliant-servers-ml-dl-sl/bug-on-ilo-connect-with-posh-rest/m-p/7208560#M185847</guid>
      <dc:creator>Marcel_D</dc:creator>
      <dc:date>2024-03-11T07:52:25Z</dc:date>
    </item>
    <item>
      <title>Re: Bug on iLo connect with POSH REST?</title>
      <link>https://community.hpe.com/t5/proliant-servers-ml-dl-sl/bug-on-ilo-connect-with-posh-rest/m-p/7231766#M190358</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I'm not saying this is your problem, but as with all REStful interfaces, it is best practise to disconnect the session after you're done. Otherwise you run the risk of reaching the session limit on the iLO. Sessions expire after 30 mins by default, so its unlikely in your case.&lt;/P&gt;&lt;P&gt;However, why not try either of the following to see if your code becomes more robust?&lt;/P&gt;&lt;OL&gt;&lt;LI&gt;don't reconnect to a new session each time - an initial session created before the loop will stay active, as long as you make a request before the 30 minute expiry.&lt;/LI&gt;&lt;LI&gt;disconnect the session each time following your query.&lt;/LI&gt;&lt;/OL&gt;</description>
      <pubDate>Fri, 20 Dec 2024 12:17:37 GMT</pubDate>
      <guid>https://community.hpe.com/t5/proliant-servers-ml-dl-sl/bug-on-ilo-connect-with-posh-rest/m-p/7231766#M190358</guid>
      <dc:creator>RoyAtkins</dc:creator>
      <dc:date>2024-12-20T12:17:37Z</dc:date>
    </item>
  </channel>
</rss>

