- Community Home
- >
- Servers and Operating Systems
- >
- HPE BladeSystem
- >
- BladeSystem - General
- >
- Powershell Script to get Array Diagnostic Utility ...
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Discussions
Discussions
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-26-2014 07:48 AM
09-26-2014 07:48 AM
Powershell Script to get Array Diagnostic Utility (ADU) Report online in vSphere ESXi.
Marcio created a new PowerShell script for integrating ADU into VMware ESXi software:
************
Hello Guys,
I create one script to run HP ADU logs in many hosts vSphere at same time.
In my tests the command “hpssaduesxi” running fine in 5.5 with version “1.60.17.0” and 5.0 with “2.0.23.0”.
----------------------------------------
Follow the script:
# Reading a list of hosts
# Sample file format for CSV
# File Content
#-----------------------------------
#hostname,username,password
#hostnameA.domain,root,password_for_root
#hostnameB.domain,root,password_for_root
#-----------------------------------
# File Content
#-----------------------------------
#hostname,username,password
#server1.hp.com,root,P@ssword!
#-----------------------------------
Import-Csv "C:\Scripts\servidores.csv" | ForEach-Object {
$hostname = $_."hostname"
$username = $_."username"
$password = $_."password"
$filename = $hostname.split(".")
$filename = $filename[0] + ".zip"
# Connect to vSphere ESXi Host
Connect-VIServer $hostname -user $username -password $password
# Get vSphere ESXi version
$versao = get-view -ViewType HostSystem -Property Name,Config.Product | foreach {$_.Name, $_.Config.Product} | select Version
# echo $versao
if ($versao -match "5.5.0")
{
echo "ESXi Versão 5.5....."
# Mount HDU Command Line based of vSphere Version
$comando = "C:\scripts\hpssaducli55\bin\hpssaduesxi --server=$hostname --user=$username --password=$password C:\scripts\Reports\$filename"
# Executing External Command
cmd /c $comando
}
if ($versao -match "5.0.0")
{
echo "ESXi Versão 5.0....."
# Mount HDU Command Line based of vSphere Version
$comando = "C:\scripts\hpssaducli50\bin\hpssaduesxi --server=$hostname --user=$username --password=$password C:\scripts\Reports\$filename"
# Executing External Command
cmd /c $comando
}
# Disconnect vSphere Host
Disconnect-VIServer $hostname -confirm:$false
echo "----------------------------------------------------------"
}
-------------------------------------------------- Regards
***********
Any feedback or comments?