Created
October 9, 2019 14:16
-
-
Save manualbashing/c7cb14441c369fe6407b60a2f2166ac1 to your computer and use it in GitHub Desktop.
Returns nmp Device Settings for SC Storage
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| function Get-NmpDeviceSettings ($VMHost) | |
| { | |
| $VMHost = Get-VMHost $VMHost | |
| foreach ($vmh in $VMHost) | |
| { | |
| $esxcli = $VMHost | Get-EsxCli -V2 | |
| $esxcli.storage.nmp.device.list.Invoke() | | |
| Where-Object DeviceDisplayName -like COMPELNT* | | |
| Select-Object Device*, | |
| PathSelectionPolicy, | |
| StorageArrayType, | |
| @{n='action_OnRetryErrors'; e={ ($_.StorageArrayTypeDeviceConfig -replace '^.*action_OnRetryErrors=(on|off).*$', '$1') -eq 'on' }}, | |
| @{n='iops'; e={ $_.PathSelectionPolicyDeviceConfig -replace '^.*iops=([0-9]+).*$', '$1' }}, | |
| @{n='VMHost'; e={ $vmh }} | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment