From 3f3bd0314e171ac7ecf6abee3e817e02ecaf3542 Mon Sep 17 00:00:00 2001 From: Alan Renouf Date: Fri, 6 Jan 2017 12:54:51 -0800 Subject: [PATCH] VSAN HCL Database Script VSAN HCL Database script --- Scripts/Get-VsanHclDatabase.ps1 | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 Scripts/Get-VsanHclDatabase.ps1 diff --git a/Scripts/Get-VsanHclDatabase.ps1 b/Scripts/Get-VsanHclDatabase.ps1 new file mode 100644 index 0000000..66ac72f --- /dev/null +++ b/Scripts/Get-VsanHclDatabase.ps1 @@ -0,0 +1,29 @@ +Function Get-VsanHclDatabase { +<# + .NOTES + =========================================================================== + Created by: Alan Renouf + Organization: VMware + Blog: http://virtu-al.net + Twitter: @alanrenouf + =========================================================================== + .SYNOPSIS + This function will allow you to view and download the VSAN Hardware Compatability List (HCL) Database + + .DESCRIPTION + Use this function to view or download the VSAN HCL + .EXAMPLE + View the latest online HCL Database from online source + PS C:\> Get-VsanHclDatabase | Format-Table + .EXAMPLE + Download the latest HCL Database from online source and store locally + PS C:\> Get-VsanHclDatabase -filepath ~/hcl.json +#> +param ($filepath) + $uri = "https://partnerweb.vmware.com/service/vsan/all.json" + If ($filepath) { + Invoke-WebRequest -Uri $uri -OutFile $filepath + } Else { + Invoke-WebRequest -Uri $uri | ConvertFrom-Json | Select-Object -ExpandProperty Data | Select-object -ExpandProperty Controller + } +} \ No newline at end of file