<?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 Announcing release of HPE Nimble Storage PowerShell Toolkit version 2.1.0 &amp;amp; Linux Support in Application Integration</title>
    <link>https://community.hpe.com/t5/application-integration/announcing-release-of-hpe-nimble-storage-powershell-toolkit/m-p/7036619#M1116</link>
    <description>&lt;P&gt;&lt;FONT size="3"&gt;Sorry it has been a while since my last update, but this surrounds a bug found where the Nimble PowerShell Toolkit 2.1.0 has not been working properly on Linux platform. I have been working hard to determine the correct procedure to make this work, and have the process listed below. All of it surrounds the fact that in PowerShell 6.x they removed the ability to use Invoke-RestAPI commands and to ignore the certificate. As a security process, the certificate needs to be valid/trusted. Additionally the method to import the Server certificate automatically does not exist in PowerShell on Linux. So we find ourselves in a quandary.&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size="3"&gt;If I am running PowerShell 5.x --&amp;gt; I can use either the 'IgnoreServerCertificate' or the 'ImportServerCertificate' options to connect.&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size="3"&gt;If I am running PowerShell 6.x on Windows --&amp;gt; I can only use the 'ImportServerCertificate' options&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size="3"&gt;If I am running on PowerShell 6.x on Linux --&amp;gt; Neither the Import or Ignore options work to initially install the certificate.&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size="3"&gt;Note also that this is ONLY important the first time you connect, i.e. If you import the certificate, you will never need to use either option ever again.&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size="3"&gt;The below procedure is to fix the PowerShell 6.x on Linux initial connection, and only needs to be done once.&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size="3"&gt;From your Linux Machine (In this case I was using Ubuntu 18.04, but will test against CentOS next).&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size="3"&gt;To make things easier, the red commands are typed into a Linux shell, while the blue commands are PowerShell,&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size="3"&gt;&lt;STRONG&gt;Step 1.&lt;/STRONG&gt; &lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size="3"&gt;Let's ensure that we have the most recent version of PowerShell 6.1.3 from the GitHub repository;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size="2" face="courier new,courier" color="#FF0000"&gt;wget https://github/PowerShell/PowerShell/releases/download/v6/1/3/powershell_6.1.3-1.ubuntu.1.8.04_amd64.deb&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size="2" face="courier new,courier" color="#FF0000"&gt;sudo dpkg -i powershell_6.1.3-1.ubuntu.18.04_amd64.deb&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size="2" face="courier new,courier" color="#FF0000"&gt;sudo apt-get update&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size="2" face="courier new,courier" color="#FF0000"&gt;sudo apt-get install -y powershell&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Step 2.&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;We will want to download the PowerShell Module to a server if your environment and place it on a share in a folder in unzipped format. Once the folder is shared out use the following command to copy it to a modules directory on your Linux Server.&lt;/P&gt;&lt;P&gt;I have found that its easier to install an SMBClient and just grab the files that it is to actually mount the share, for that I need to install the SBMClient software&lt;/P&gt;&lt;P&gt;&lt;FONT color="#FF0000"&gt;sudo apt-get smbclient&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#FF0000"&gt;cd /opt/microsoft/powershell/6/Modules&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#FF0000"&gt;sudo mkdir HPENimblePowerShellToolkit&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#FF0000"&gt;sudo mkdir HPENimblePowerShellToolkit/en-us&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#FF0000"&gt;sudo mkdir HPENimblePowerShellToolkit/scripts&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#FF0000"&gt;smbclient '//servername/sharename' -c 'lcd HPENimblePowerShellToolkit; cd HPENimblePowerShellToolkit;mget * ' -U username=domain/username%password&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;You will be prompted to give your hit yes to accept the copy operation a number of times on all three SMBClient Commands.&lt;/P&gt;&lt;P&gt;&lt;FONT color="#FF0000"&gt;smbclient '//servername/sharename' -c 'lcd HPENimblePowerShellToolkit; cd HPENimblePowerShellToolkit/en-US;mget * ' -U username=domain/username%password&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#FF0000"&gt;smbclient '//servername/sharename' -c 'lcd HPENimblePowerShellToolkit; cd HPENimblePowerShellToolkit/scripts;mget * ' -U username=domain/username%password&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Step 3&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;To verify they are all in place, you can now open PowerShell, and should be able to import the module without errors.&lt;/P&gt;&lt;P&gt;&lt;FONT color="#FF0000"&gt;sudo pwsh&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000FF"&gt;import-module HPENimblePowerShell&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#FF0000"&gt;exit&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Step 4&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;Ok, now we need to manually import the certificate from the array and insert it on the Linux machine, the following command does this using the Gnutls library.&lt;/P&gt;&lt;P&gt;&lt;FONT color="#FF0000"&gt;sudo apt-get install gnutls&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#FF0000"&gt;sudo gnutls-cli --printcerts ArrayIP \ &amp;lt; /dev/null \ &amp;gt; ArrayIP.crt&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#FF0000"&gt;sudo mkdir /usr/local/share/ca-certificates/NimbleArray -m 755&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#FF0000"&gt;sudo chmod ArrayIP.crt 644&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#FF0000"&gt;sudo cp ArrayIP.crt /usr/local/share/ca-certificates/NimbleArray/ArrayIP.crt&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#FF0000"&gt;sudo update-ca-certificates&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Step 5&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;Now that the certificates are in place, we need to modify a single line in the PowerShell module to make this work, You can do this using vi, and the line you want to modify is in the file /HPENimbleToolkit/scripts/helpers.ps1&lt;/P&gt;&lt;P&gt;The individual line is inside the 'Connect-NSGroup' function and is around line #85 and the line currently reads '&lt;FONT color="#0000FF"&gt;ValidateServerCertificate $group&lt;/FONT&gt;'&lt;/P&gt;&lt;P&gt;We need to change this line to read ' &lt;FONT color="#0000FF"&gt;if ($IsLinux -ne $true) { ValidateServerCertificate $group}&lt;/FONT&gt;'&lt;/P&gt;&lt;P&gt;Once this is saved, you should be able to use the PowerShell command as follows;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#FF0000"&gt;Sudo pwsh&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000FF"&gt;import-module HPENimbleToolkit -force&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000FF"&gt;connect-nsGroup -group NimbleArrayIP -cred admin&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;You will be prompted for your password, but no longer have to worry about either importing or ignoring the certificate to properly connect. All other commands now work like expected.&lt;/P&gt;&lt;P&gt;I should note that if you make changes to the network configuration of the Nimble array, the Certificate may change, at which point you will need to re-run.&lt;/P&gt;&lt;P&gt;I have come up with modifications for the module to detect that Linux is the base OS, and to allow the ImportServerCertificate argument to work by modifying the behaviour of the command, but you will have to wait for the next release of the toolkit for that to be tested. I also need to test and possibly modify this procedure for other variants of Linux/Unix as well as test against Macs. Next on my list is CentOS.&lt;/P&gt;</description>
    <pubDate>Fri, 01 Mar 2019 19:29:33 GMT</pubDate>
    <dc:creator>Chris_Lionetti</dc:creator>
    <dc:date>2019-03-01T19:29:33Z</dc:date>
    <item>
      <title>Announcing release of HPE Nimble Storage PowerShell Toolkit version 2.1.0 &amp; Linux Support</title>
      <link>https://community.hpe.com/t5/application-integration/announcing-release-of-hpe-nimble-storage-powershell-toolkit/m-p/7036619#M1116</link>
      <description>&lt;P&gt;&lt;FONT size="3"&gt;Sorry it has been a while since my last update, but this surrounds a bug found where the Nimble PowerShell Toolkit 2.1.0 has not been working properly on Linux platform. I have been working hard to determine the correct procedure to make this work, and have the process listed below. All of it surrounds the fact that in PowerShell 6.x they removed the ability to use Invoke-RestAPI commands and to ignore the certificate. As a security process, the certificate needs to be valid/trusted. Additionally the method to import the Server certificate automatically does not exist in PowerShell on Linux. So we find ourselves in a quandary.&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size="3"&gt;If I am running PowerShell 5.x --&amp;gt; I can use either the 'IgnoreServerCertificate' or the 'ImportServerCertificate' options to connect.&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size="3"&gt;If I am running PowerShell 6.x on Windows --&amp;gt; I can only use the 'ImportServerCertificate' options&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size="3"&gt;If I am running on PowerShell 6.x on Linux --&amp;gt; Neither the Import or Ignore options work to initially install the certificate.&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size="3"&gt;Note also that this is ONLY important the first time you connect, i.e. If you import the certificate, you will never need to use either option ever again.&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size="3"&gt;The below procedure is to fix the PowerShell 6.x on Linux initial connection, and only needs to be done once.&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size="3"&gt;From your Linux Machine (In this case I was using Ubuntu 18.04, but will test against CentOS next).&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size="3"&gt;To make things easier, the red commands are typed into a Linux shell, while the blue commands are PowerShell,&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size="3"&gt;&lt;STRONG&gt;Step 1.&lt;/STRONG&gt; &lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size="3"&gt;Let's ensure that we have the most recent version of PowerShell 6.1.3 from the GitHub repository;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size="2" face="courier new,courier" color="#FF0000"&gt;wget https://github/PowerShell/PowerShell/releases/download/v6/1/3/powershell_6.1.3-1.ubuntu.1.8.04_amd64.deb&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size="2" face="courier new,courier" color="#FF0000"&gt;sudo dpkg -i powershell_6.1.3-1.ubuntu.18.04_amd64.deb&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size="2" face="courier new,courier" color="#FF0000"&gt;sudo apt-get update&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size="2" face="courier new,courier" color="#FF0000"&gt;sudo apt-get install -y powershell&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Step 2.&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;We will want to download the PowerShell Module to a server if your environment and place it on a share in a folder in unzipped format. Once the folder is shared out use the following command to copy it to a modules directory on your Linux Server.&lt;/P&gt;&lt;P&gt;I have found that its easier to install an SMBClient and just grab the files that it is to actually mount the share, for that I need to install the SBMClient software&lt;/P&gt;&lt;P&gt;&lt;FONT color="#FF0000"&gt;sudo apt-get smbclient&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#FF0000"&gt;cd /opt/microsoft/powershell/6/Modules&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#FF0000"&gt;sudo mkdir HPENimblePowerShellToolkit&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#FF0000"&gt;sudo mkdir HPENimblePowerShellToolkit/en-us&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#FF0000"&gt;sudo mkdir HPENimblePowerShellToolkit/scripts&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#FF0000"&gt;smbclient '//servername/sharename' -c 'lcd HPENimblePowerShellToolkit; cd HPENimblePowerShellToolkit;mget * ' -U username=domain/username%password&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;You will be prompted to give your hit yes to accept the copy operation a number of times on all three SMBClient Commands.&lt;/P&gt;&lt;P&gt;&lt;FONT color="#FF0000"&gt;smbclient '//servername/sharename' -c 'lcd HPENimblePowerShellToolkit; cd HPENimblePowerShellToolkit/en-US;mget * ' -U username=domain/username%password&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#FF0000"&gt;smbclient '//servername/sharename' -c 'lcd HPENimblePowerShellToolkit; cd HPENimblePowerShellToolkit/scripts;mget * ' -U username=domain/username%password&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Step 3&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;To verify they are all in place, you can now open PowerShell, and should be able to import the module without errors.&lt;/P&gt;&lt;P&gt;&lt;FONT color="#FF0000"&gt;sudo pwsh&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000FF"&gt;import-module HPENimblePowerShell&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#FF0000"&gt;exit&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Step 4&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;Ok, now we need to manually import the certificate from the array and insert it on the Linux machine, the following command does this using the Gnutls library.&lt;/P&gt;&lt;P&gt;&lt;FONT color="#FF0000"&gt;sudo apt-get install gnutls&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#FF0000"&gt;sudo gnutls-cli --printcerts ArrayIP \ &amp;lt; /dev/null \ &amp;gt; ArrayIP.crt&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#FF0000"&gt;sudo mkdir /usr/local/share/ca-certificates/NimbleArray -m 755&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#FF0000"&gt;sudo chmod ArrayIP.crt 644&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#FF0000"&gt;sudo cp ArrayIP.crt /usr/local/share/ca-certificates/NimbleArray/ArrayIP.crt&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#FF0000"&gt;sudo update-ca-certificates&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Step 5&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;Now that the certificates are in place, we need to modify a single line in the PowerShell module to make this work, You can do this using vi, and the line you want to modify is in the file /HPENimbleToolkit/scripts/helpers.ps1&lt;/P&gt;&lt;P&gt;The individual line is inside the 'Connect-NSGroup' function and is around line #85 and the line currently reads '&lt;FONT color="#0000FF"&gt;ValidateServerCertificate $group&lt;/FONT&gt;'&lt;/P&gt;&lt;P&gt;We need to change this line to read ' &lt;FONT color="#0000FF"&gt;if ($IsLinux -ne $true) { ValidateServerCertificate $group}&lt;/FONT&gt;'&lt;/P&gt;&lt;P&gt;Once this is saved, you should be able to use the PowerShell command as follows;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#FF0000"&gt;Sudo pwsh&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000FF"&gt;import-module HPENimbleToolkit -force&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000FF"&gt;connect-nsGroup -group NimbleArrayIP -cred admin&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;You will be prompted for your password, but no longer have to worry about either importing or ignoring the certificate to properly connect. All other commands now work like expected.&lt;/P&gt;&lt;P&gt;I should note that if you make changes to the network configuration of the Nimble array, the Certificate may change, at which point you will need to re-run.&lt;/P&gt;&lt;P&gt;I have come up with modifications for the module to detect that Linux is the base OS, and to allow the ImportServerCertificate argument to work by modifying the behaviour of the command, but you will have to wait for the next release of the toolkit for that to be tested. I also need to test and possibly modify this procedure for other variants of Linux/Unix as well as test against Macs. Next on my list is CentOS.&lt;/P&gt;</description>
      <pubDate>Fri, 01 Mar 2019 19:29:33 GMT</pubDate>
      <guid>https://community.hpe.com/t5/application-integration/announcing-release-of-hpe-nimble-storage-powershell-toolkit/m-p/7036619#M1116</guid>
      <dc:creator>Chris_Lionetti</dc:creator>
      <dc:date>2019-03-01T19:29:33Z</dc:date>
    </item>
    <item>
      <title>Re: Announcing release of HPE Nimble Storage PowerShell Toolkit version 2.1.0 &amp; Linux Support</title>
      <link>https://community.hpe.com/t5/application-integration/announcing-release-of-hpe-nimble-storage-powershell-toolkit/m-p/7087094#M1169</link>
      <description>&lt;P&gt;Has security changed in PowerShell 7.0?&amp;nbsp; I have attempt to get this to work with PS7 on Centos 7 and have not been able to get it working.&lt;/P&gt;</description>
      <pubDate>Tue, 05 May 2020 20:10:01 GMT</pubDate>
      <guid>https://community.hpe.com/t5/application-integration/announcing-release-of-hpe-nimble-storage-powershell-toolkit/m-p/7087094#M1169</guid>
      <dc:creator>JimReynolds</dc:creator>
      <dc:date>2020-05-05T20:10:01Z</dc:date>
    </item>
  </channel>
</rss>

