-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcheck-luns.ps1
More file actions
14 lines (13 loc) · 787 Bytes
/
Copy pathcheck-luns.ps1
File metadata and controls
14 lines (13 loc) · 787 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
# Need to connect to v-Center host before running this
# Can be done via Power-Cli - Connect-VIServer vCenterName
$ESXHosts = Get-VMHost
$output = "{0},{1},{2},{3},{4},{5},{6}`r`n" -f "Hostname", "Device Name", "VAAIPluginName", "ATSStatus", "CloneStatus", "DeleteStatus", "ZeroStatus"
foreach($EsxHost in $ESXHosts){
$esxcli = Get-VMHost $EsxHost | Get-EsxCli -V2
$esxclioutput = $esxcli.storage.core.device.vaai.status.get.Invoke()
foreach ($LUN in $esxclioutput){
#Output should be: Hostname, Device Name, VAAIPluginName, ATSStatus, CloneStatus, DeleteStatus, ZeroStatus
$output = "{0}{1},{2},{3},{4},{5},{6},{7}`r`n" -f $output, $esxHost, $LUN.Device, $LUN.VAAIPluginName, $LUN.ATSStatus,$LUN.CloneStatus, $LUN.DeleteStatus, $LUN.ZeroStatus
}
}
Write-Output $output