diff --git a/docs/install.md b/docs/install.md index 47fc5297..4e1b28e6 100644 --- a/docs/install.md +++ b/docs/install.md @@ -1,5 +1,7 @@ # Installing the Module +## From Powershell Gallery + Verify that your system has a [supported edition and version](/powershell-module-for-vmware-cloud-foundation-password-management/#powershell) of PowerShell installed. Install the PowerShell [module dependencies](/powershell-module-for-vmware-cloud-foundation-password-management/#module-dependencies) from the PowerShell Gallery by running the following commands: @@ -24,6 +26,56 @@ To verify the module dependencies are installed, run the following commands in t Test-VcfPasswordManagementPrereq ``` +## From Air-gapped Machine + +Verify that your system has a [supported edition and version](/powershell-module-for-vmware-cloud-foundation-password-management/#powershell) of PowerShell installed. + +=== ":fontawesome-brands-windows:   Windows" + + Save Modules [module dependencies](/powershell-module-for-vmware-cloud-foundation-password-management/#module-dependencies) from the PowerShell Gallery on a non air-gapped machine by running the following commands: + + ```powershell + --8<-- "./docs/snippets/save-module-local-windows.ps1" + ``` + + Copy the PowerShell Modules [module dependencies](/powershell-module-for-vmware-cloud-foundation-password-management/#module-dependencies) from the Local Machine to air-gapped facing machine by running the following commands: + + ```powershell + --8<-- "./docs/snippets/copy-module-local-windows.ps1" + ``` + + Import the PowerShell Modules [module dependencies](/powershell-module-for-vmware-cloud-foundation-password-management/#module-dependencies) from the air-gapped machine by running the following commands: + + ```powershell + --8<-- "./docs/snippets/import-module.ps1" + ``` + +=== ":fontawesome-brands-linux:   Linux" + + Prerequisite for module install on Linux Machine + + ```bash + --8<-- "./docs/snippets/pre-req-linux.sh" + ``` + + Save Modules [module dependencies](/powershell-module-for-vmware-cloud-foundation-password-management/#module-dependencies) from the PowerShell Gallery on a non air-gapped machine by running the following commands: + + ```powershell + --8<-- "./docs/snippets/save-module-local-linux.ps1" + ``` + + Copy the PowerShell Modules [module dependencies](/powershell-module-for-vmware-cloud-foundation-password-management/#module-dependencies) from the Local Machine to air-gapped facing machine by running the following commands: + + ```bash + --8<-- "./docs/snippets/copy-module-local-linux.sh" + ``` + + Import the PowerShell Modules [module dependencies](/powershell-module-for-vmware-cloud-foundation-password-management/#module-dependencies) from the air-gapped machine by running the following commands in PowerShell: + + ```powershell + --8<-- "./docs/snippets/import-module-local-linux.ps1" + ``` + :material-information-slab-circle:   [Reference](/powershell-module-for-vmware-cloud-foundation-password-management/documentation/functions/Test-VcfPasswordManagementPrereq/) Once installed, any cmdlets associated with `VMware.CloudFoundation.PasswordManagement` and the its dependencies will be available for use. diff --git a/docs/snippets/copy-module-local-linux.sh b/docs/snippets/copy-module-local-linux.sh new file mode 100644 index 00000000..de4e7d09 --- /dev/null +++ b/docs/snippets/copy-module-local-linux.sh @@ -0,0 +1 @@ +scp -r /home/modules/* username@remote_host:/home/lab/.local/share/powershell/Modules/ \ No newline at end of file diff --git a/docs/snippets/copy-module-local-windows.ps1 b/docs/snippets/copy-module-local-windows.ps1 new file mode 100644 index 00000000..598c97e5 --- /dev/null +++ b/docs/snippets/copy-module-local-windows.ps1 @@ -0,0 +1 @@ +Copy-Item -Path F:\Module\* -Destination '\\\C$\Program Files\WindowsPowerShell\Modules\' -Recurse \ No newline at end of file diff --git a/docs/snippets/import-module-local-linux.ps1 b/docs/snippets/import-module-local-linux.ps1 new file mode 100644 index 00000000..9ed6b714 --- /dev/null +++ b/docs/snippets/import-module-local-linux.ps1 @@ -0,0 +1,5 @@ +Import-Module -Name VMware.PowerCLI +Import-Module -Name VMware.vSphere.SsoAdmin +Import-Module -Name PowerVCF +Import-Module -Name PowerValidatedSolutions +Import-Module -Name VMware.CloudFoundation.PasswordManagement diff --git a/docs/snippets/pre-req-linux.sh b/docs/snippets/pre-req-linux.sh new file mode 100644 index 00000000..f305e4f9 --- /dev/null +++ b/docs/snippets/pre-req-linux.sh @@ -0,0 +1 @@ +mkdir /home/modules \ No newline at end of file diff --git a/docs/snippets/save-module-local-linux.ps1 b/docs/snippets/save-module-local-linux.ps1 new file mode 100644 index 00000000..fd67755f --- /dev/null +++ b/docs/snippets/save-module-local-linux.ps1 @@ -0,0 +1,5 @@ +Save-Module -Name VMware.vSphere.SsoAdmin -MinimumVersion 1.3.9 -Path /home/modules +Save-Module -Name VMware.PowerCLI -MinimumVersion 13.0.0 -Path /home/modules +Save-Module -Name PowerVCF -MinimumVersion 2.4.0 -Path /home/modules +Save-Module -Name PowerValidatedSolutions -MinimumVersion 2.6.0 -Path /home/modules +Save-Module -Name VMware.CloudFoundation.PasswordManagement -Path /home/modules \ No newline at end of file diff --git a/docs/snippets/save-module-local-windows.ps1 b/docs/snippets/save-module-local-windows.ps1 new file mode 100644 index 00000000..409037bd --- /dev/null +++ b/docs/snippets/save-module-local-windows.ps1 @@ -0,0 +1,5 @@ +Save-Module -Name VMware.vSphere.SsoAdmin -MinimumVersion 1.3.9 -Path F:\Module\ +Save-Module -Name VMware.PowerCLI -MinimumVersion 13.0.0 -Path F:\Module\ +Save-Module -Name PowerVCF -MinimumVersion 2.4.0 -Path F:\Module\ +Save-Module -Name PowerValidatedSolutions -MinimumVersion 2.6.0 -Path F:\Module\ +Save-Module -Name VMware.CloudFoundation.PasswordManagement -Path F:\Module\ \ No newline at end of file