From fc90f81d88d29d2d04b5c10fef3438d5342aa50f Mon Sep 17 00:00:00 2001 From: haberstrohr Date: Thu, 31 Aug 2017 10:02:54 -0500 Subject: [PATCH] Get-VMHostWWPN Returns WWPN in Base16 format, similar to what is displayed in the GUI. --- Scripts/Get-VMHostWWPN.ps1 | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 Scripts/Get-VMHostWWPN.ps1 diff --git a/Scripts/Get-VMHostWWPN.ps1 b/Scripts/Get-VMHostWWPN.ps1 new file mode 100644 index 0000000..921b5bb --- /dev/null +++ b/Scripts/Get-VMHostWWPN.ps1 @@ -0,0 +1,17 @@ +function Get-VMHostWWPN { +<# +Script name: Get-VMHostWWPN.ps1 +Created on: 08/31/2017 +Author: Robin Haberstroh, @strohland +Description: This script returns the WWPN of the hosts FiberChannel HBA in a readable format that corresponds to what storage team expects +Dependencies: None known +#> + param( + [string]$cluster + ) + + Get-Cluster $cluster | get-vmhost | get-vmhosthba -type FibreChannel | + format-table VMHost, Device, @{ + n='WorldWidePortName';e={[convert]::ToString($_.PortWorldWideName, 16)} + } +} \ No newline at end of file