File tree Expand file tree Collapse file tree 2 files changed +18
-1
lines changed
PureStorage.FlashArray.VMware.VCF Expand file tree Collapse file tree 2 files changed +18
-1
lines changed Original file line number Diff line number Diff line change 6565 RequiredModules = @ (
6666 @ {" ModuleName" = " PureStoragePowerShellSDK" ;" ModuleVersion" = " 1.13.1.12" }
6767 @ {" ModuleName" = " PureStorage.FlashArray.VMware.Configuration" ;" ModuleVersion" = " 2.0.0.0" }
68- @ {" ModuleName" = " PowerVCF" ;" ModuleVersion" = " 2.1.0" }
6968 )
7069
7170 # Assemblies that must be loaded prior to importing this module
Original file line number Diff line number Diff line change @@ -79,6 +79,12 @@ function Initialize-PfaVcfWorkloadDomain {
7979
8080 )
8181 Import-Module PureStoragePowerShellSDK
82+ try {
83+ Get-InstalledModule - Name PowerVCF - ErrorAction Stop | Out-Null
84+ }
85+ catch {
86+ throw " Please install PowerVCF with install-module PowerVCF."
87+ }
8288 if ($psversiontable.PSEdition -ne " Core" )
8389 {
8490 throw " The cmdlet Initialize-PfaVcfWorkloadDomain is only supported with PowerShell Core (7.x or later)."
@@ -377,6 +383,12 @@ function Get-PfaVcfVasaProvider {
377383 will not be liable for any damage or loss to the system.
378384 ************************************************************************
379385 #>
386+ try {
387+ Get-InstalledModule - Name PowerVCF - ErrorAction Stop | Out-Null
388+ }
389+ catch {
390+ throw " Please install PowerVCF with install-module PowerVCF."
391+ }
380392 if ($psversiontable.PSEdition -ne " Core" )
381393 {
382394 throw " The cmdlet Get-PfaVcfVasaProvider is only supported with PowerShell Core (7.x or later)."
@@ -441,6 +453,12 @@ function New-PfaVcfVasaProvider {
441453 [ValidateSet (' iSCSI' , ' FC' )]
442454 [string ]$Protocol
443455 )
456+ try {
457+ Get-InstalledModule - Name PowerVCF - ErrorAction Stop | Out-Null
458+ }
459+ catch {
460+ throw " Please install PowerVCF with install-module PowerVCF."
461+ }
444462 if ($psversiontable.PSEdition -ne " Core" )
445463 {
446464 throw " The cmdlet New-PfaVcfVasaProvider is only supported with PowerShell Core (7.x or later)."
You can’t perform that action at this time.
0 commit comments