<?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: Need help with ssacli and PowerCLI in Servers - General</title>
    <link>https://community.hpe.com/t5/servers-general/need-help-with-ssacli-and-powercli/m-p/7048760#M10562</link>
    <description>&lt;P&gt;Hello&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I would request you to reach out to the below mentioned communities and they will be assist you further .&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;A href="https://communities.vmware.com/community/vmtn/automationtools/powercli/content" target="_blank"&gt;https://communities.vmware.com/community/vmtn/automationtools/powercli/content&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;RRT&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Tue, 04 Jun 2019 08:09:27 GMT</pubDate>
    <dc:creator>RaviTyagi</dc:creator>
    <dc:date>2019-06-04T08:09:27Z</dc:date>
    <item>
      <title>Need help with ssacli and PowerCLI</title>
      <link>https://community.hpe.com/t5/servers-general/need-help-with-ssacli-and-powercli/m-p/7048674#M10557</link>
      <description>&lt;P&gt;I'm trying to build a tool that can validate the wear stats on Solid State disks using the VMware.PowerCLI module for Powershell.&amp;nbsp; For reference, I'm currently working with&amp;nbsp;PowerCLI Version:&amp;nbsp; VMware PowerCLI 11.0.0 build 10380590&lt;/P&gt;&lt;P&gt;I'm trying to figure out how to modify scripts to use get-esxcli v2 and I just am not getting how to convert these to v2.&amp;nbsp; I'll show some examples of what I was able to pull previously, and if anyone has some insight I would appreciate the help translating these.&lt;/P&gt;&lt;P&gt;First thing first, I'll define the variables, so for the old school (I know it wasn't called V1, but the first version of get-esxcli):&lt;/P&gt;&lt;P&gt;$esxcli = get-esxcli -vmhost &amp;lt;esxihostname&amp;gt;&lt;/P&gt;&lt;P&gt;Then to show all controllers I would do the following:&lt;BR /&gt;$esxcli.ssacli.cmd("ctrl all show status")&lt;/P&gt;&lt;P&gt;lets say this then revealed I had two controllers 1) E208i-a in Slot 0 and 2) E208i-p in Slot 1.&amp;nbsp; I could get details on the controllers with:&lt;/P&gt;&lt;P&gt;$esxcli.ssacli.cmd("ctrl all show detail")&lt;/P&gt;&lt;P&gt;If I wanted to get the physical disks on a specific controller I could do something like:&lt;/P&gt;&lt;P&gt;$esxcli.ssacli.cmd("ctrl slot=0 pd all show status")&lt;/P&gt;&lt;P&gt;And then to show details (lots and lots of details) on a specific disk on that array controller I would do the following:&lt;/P&gt;&lt;P&gt;$esxcli.ssacli.cmd("ctrl slot=0 pd 1I:3:2 show detail")&lt;/P&gt;&lt;P&gt;Some of the details you can get out of this are obviously the size, type, exposed to OS, speed of the disk, firmware, Serial Number, if it is a Solid State disk, its estimated life based on workload to date...&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;At our organization we were receving OneView alerts similar to the following:&lt;/P&gt;&lt;P&gt;Solid state disk wear status is now 131072 for drive at location Physical Volume Port: 4I Box: 0 Bay: 10 connected to controller in Smart Array B140i RAID in Slot 0. BD-L4-C2, bay 13&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Resolution&lt;/STRONG&gt; If the SSD wear status is 'ssdWearOut(6)', replace the drive.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;So I had developed a tool to quickly go out and grab the wear stats on that disk.&amp;nbsp; But that script is using the older, first version of get-esxcli.&amp;nbsp; Now I'm trying to get the same thing using -v2 version of get-esxcli and I just can't get it working.&amp;nbsp; The reason I'm doing this is I constantly get a warning saying that the older version is going to be deprecated soon.&amp;nbsp; The tool has provided some value to my organization and I want it to remain useful so if I can figure out how to switch to the -v2 I won't have to worry about when VMware deprecates the old version.&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;So if I run get-esxcli -v2 now I get the following:&lt;BR /&gt;$esxcli.ssacli.cmd("ctrl all show status")&lt;BR /&gt;Method invocation failed because [VMware.VimAutomation.ViCore.Impl.V1.EsxCli.EsxCliElementImpl] does not contain a method named 'cmd'.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Has anyone converted any PowerCLI scripts to the -v2 version of get-esxcli?&amp;nbsp; And if so, can you help me understand what I'm missing?&amp;nbsp; If I figure this out myself I'll post here as well.&lt;/P&gt;&lt;P&gt;Thank you&lt;/P&gt;</description>
      <pubDate>Mon, 03 Jun 2019 14:51:46 GMT</pubDate>
      <guid>https://community.hpe.com/t5/servers-general/need-help-with-ssacli-and-powercli/m-p/7048674#M10557</guid>
      <dc:creator>GMFJB</dc:creator>
      <dc:date>2019-06-03T14:51:46Z</dc:date>
    </item>
    <item>
      <title>Re: Need help with ssacli and PowerCLI</title>
      <link>https://community.hpe.com/t5/servers-general/need-help-with-ssacli-and-powercli/m-p/7048760#M10562</link>
      <description>&lt;P&gt;Hello&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I would request you to reach out to the below mentioned communities and they will be assist you further .&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;A href="https://communities.vmware.com/community/vmtn/automationtools/powercli/content" target="_blank"&gt;https://communities.vmware.com/community/vmtn/automationtools/powercli/content&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;RRT&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 04 Jun 2019 08:09:27 GMT</pubDate>
      <guid>https://community.hpe.com/t5/servers-general/need-help-with-ssacli-and-powercli/m-p/7048760#M10562</guid>
      <dc:creator>RaviTyagi</dc:creator>
      <dc:date>2019-06-04T08:09:27Z</dc:date>
    </item>
    <item>
      <title>Re: Need help with ssacli and PowerCLI</title>
      <link>https://community.hpe.com/t5/servers-general/need-help-with-ssacli-and-powercli/m-p/7048798#M10564</link>
      <description>&lt;P&gt;They point me here as ssacli is an HPE product.&amp;nbsp; I was hoping someone here had some expertise with PowerCLI.&amp;nbsp; Looks like I'm on my own with this one.&amp;nbsp; Thanks for trying.....&lt;/P&gt;</description>
      <pubDate>Tue, 04 Jun 2019 12:35:23 GMT</pubDate>
      <guid>https://community.hpe.com/t5/servers-general/need-help-with-ssacli-and-powercli/m-p/7048798#M10564</guid>
      <dc:creator>GMFJB</dc:creator>
      <dc:date>2019-06-04T12:35:23Z</dc:date>
    </item>
    <item>
      <title>Re: Need help with ssacli and PowerCLI</title>
      <link>https://community.hpe.com/t5/servers-general/need-help-with-ssacli-and-powercli/m-p/7097065#M12517</link>
      <description>&lt;P&gt;connect-viserver &amp;lt;vcenterName&amp;gt;&lt;/P&gt;&lt;P&gt;$esxcli = get-esxcli -vmhost &amp;lt;esxhostname&amp;gt;&lt;/P&gt;&lt;P&gt;$ssacliargs = $esxcli.ssacli.cmd.createargs()&lt;/P&gt;&lt;P&gt;$ssacliargs.cmdopts = "ctrl slot=0 pd all show status"&lt;/P&gt;&lt;P&gt;&lt;FONT&gt;$esxcli.ssacli.cmd.invoke($ssacliargs)&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;or&amp;nbsp;&lt;/P&gt;&lt;P&gt;instead of enumerating the args do this.&lt;/P&gt;&lt;P&gt;&lt;FONT&gt;$esxcli.ssacli.cmd.invoke(@{cmdopts="ctrl slot=0 pd all show status"})&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 03 Aug 2020 15:15:35 GMT</pubDate>
      <guid>https://community.hpe.com/t5/servers-general/need-help-with-ssacli-and-powercli/m-p/7097065#M12517</guid>
      <dc:creator>MGOberle</dc:creator>
      <dc:date>2020-08-03T15:15:35Z</dc:date>
    </item>
    <item>
      <title>Re: Need help with ssacli and PowerCLI</title>
      <link>https://community.hpe.com/t5/servers-general/need-help-with-ssacli-and-powercli/m-p/7130721#M14648</link>
      <description>&lt;P&gt;The second one worked. The first problem I had was with &lt;A href="https://www.altaro.com/vmware/install-powercli-powershellget/" target="_blank" rel="noopener"&gt;&lt;FONT color="#000000"&gt;powercli install.&lt;/FONT&gt;&lt;/A&gt; I had an old version installed, and I had to force the side-by-side installation of the new version. Honestly, I had no idea how to do it, and it took me a while until I found a guide about it on Altaro. Before that, I was able to find YouTube videos about any topic, but there was nothing of use...&lt;BR /&gt;After that, I had ssacli problems, and this thread came to the rescue... These things are useful, but installing them can be a big hassle. I almost gave up on it a few times, but I knew that I had to find a solution...&lt;/P&gt;</description>
      <pubDate>Wed, 21 Apr 2021 03:18:53 GMT</pubDate>
      <guid>https://community.hpe.com/t5/servers-general/need-help-with-ssacli-and-powercli/m-p/7130721#M14648</guid>
      <dc:creator>MilerPip</dc:creator>
      <dc:date>2021-04-21T03:18:53Z</dc:date>
    </item>
  </channel>
</rss>

