powershell-toolkit icon indicating copy to clipboard operation
powershell-toolkit copied to clipboard

Pure Storage Health Report

Open lesauska opened this issue 7 years ago • 2 comments

Hi,

I am looking for some help related to Pure storage health check reporting using power shell script. Please share the script if you have any...

Thanks in Advance...

Regards, Lesauska

lesauska avatar Jul 11 '18 11:07 lesauska

Hi Lesauska -

What details are you looking for in the report?

Thx, Barkz

barkz avatar Jul 16 '18 19:07 barkz

Hi Barkz,

Thank you for the quick reply. We want to know if the controllers are healthy, any hardware failure like disk, ports and so on.

This was the script developed on your input

$secpasswd = ConvertTo-SecureString "Password" -AsPlainText -Force

$mycreds = New-Object System.Management.Automation.PSCredential ("User ID", $secpasswd)

New-FlashArrayCapacityReport -Credential $mycreds -EndPoint XX.XX.XX.XX -OutFilePath C:\Temp -HTMLFileName ODCPSM7N011F-Report.html

Start-Sleep -s 15

New-FlashArrayCapacityReport -Credential $mycreds -EndPoint XX.XX.XX.XX -OutFilePath C:\Temp -HTMLFileName ODCPSM7N00F6-Report.html

Start-Sleep -s 15

New-FlashArrayCapacityReport -Credential $mycreds -EndPoint XX.XX.XX.XX -OutFilePath C:\Temp -HTMLFileName PDCPSM7P00CE-Report.html

Start-Sleep -s 15

New-FlashArrayCapacityReport -Credential $mycreds -EndPoint XX.XX.XX.XX -OutFilePath C:\Temp -HTMLFileName ODCPSX7P0066-Report.html

Start-Sleep -s 15

New-FlashArrayCapacityReport -Credential $mycreds -EndPoint XX.XX.XX.XX -OutFilePath C:\Temp -HTMLFileName ODCPSX7P0067-Report.html

Start-Sleep -s 15

(Get-Content "C:\Temp\ODCPSM7N011F-Report.html") + (Get-Content "C:\Temp\ODCPSM7N00F6-Report.html") + (Get-Content "C:\Temp\PDCPSM7P00CE-Report.html") + (Get-Content "C:\Temp\ODCPSX7P0066-Report.html") + (Get-Content "C:\Temp\ODCPSX7P0067-Report.html") | Set-Content "C:\TEMP\Pure_Capacity_Report.html"

#$body = Get-Content C:\temp\Pure_Capacity_Report.html -Raw

#Send-MailMessage -From "kalyan [email protected]" -To "kalyan [email protected]" -Subject "report 1" -Body $body -BodyAsHtml -SmtpServer "XX.XX.XX.XX"

Thanks, Kalyan Guturi.

On Tue, Jul 17, 2018 at 12:46 AM, barkz [email protected] wrote:

Hi Lesauska -

What details are you looking for in the report?

Thx, Barkz

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/PureStorage-OpenConnect/powershell-toolkit/issues/25#issuecomment-405351177, or mute the thread https://github.com/notifications/unsubscribe-auth/AnNb6EN7g9zk6ra6as7Tiqg3RpcKusSWks5uHOaOgaJpZM4VK_55 .

lesauska avatar Jul 17 '18 03:07 lesauska