Welcome to my As Built Report section. Keeping documentation of Omnissa, vSphere and other it-environments up to date, can be a challenge. The changes happens fast and often. Sometimes, if we need to rebuild, getting hold of information about how something was built to begin with, is in best cases difficult. Therefore, having an As Built Report at hand, can be crucial. I’m not going to go into the specifics about As Built here, as Christ Hildebrand has done that here: As Built Report’s for the Horizon Suite But, as I often work in air-gapped environments and the fact that doing this offline, is a little extra work, I will show below how I do this.
The main use-case for me is Horizon, App Volumes and UAG, but I will also download the vSphere and NetApp As Built Reports modules. The modules are available at GitHub here:
This set up is a two step procedure, I start by downloading the necessary components on a computer with an internet connection:
Nuget:
Install-PackageProvider -Name NuGet -MinimumVersion 2.8.5.201 -Force
PowerCli:
Save-Module 'VMware.PowerCLI' -MaximumVersion 13.3 -Repository 'PSGallery' -Path 'C:\AsBuildOffline\PSModules\PowerCli\13.3'
PScribo:
Save-Module -Name 'PScribo' -Repository 'PSGallery' -Path 'C:\AsBuildOffline\PSModules\PScribo'
AsBuilt modules:
Save-Module -Name 'AsBuiltReport.Core' -Repository 'PSGallery' -Path 'C:\AsBuildOffline\PSModules\AsBuilt\Core'
Save-Module 'AsBuiltReport.VMware.Horizon' -Repository 'PSGallery' -Path 'C:\AsBuildOffline\PSModules\AsBuilt\Horizon'
Save-Module 'AsBuiltReport.VMware.AppVolumes' -Repository 'PSGallery' -Path 'C:\AsBuildOffline\PSModules\AsBuilt\AppVolumes'
Save-Module 'AsBuiltReport.VMware.UAG' -Repository 'PSGallery' -Path 'C:\AsBuildOffline\PSModules\AsBuilt\UAG'
Save-Module 'AsBuiltReport.VMware.vSphere' -Repository 'PSGallery' -Path 'C:\AsBuildOffline\PSModules\AsBuilt\vSphere'
Save-Module 'AsBuiltReport.NetApp.ONTAP' -Repository 'PSGallery' -Path 'C:\AsBuildOffline\PSModules\AsBuilt\NetApp'
I copy all the downloaded components from the internet-connected server to the Air-Gapped server:
On the offline system, open a PowerShell console window and run the following command to determine the PowerShell module path.
$env:PSModulePath -Split ';'
C:\Users\username\Documents\WindowsPowerShell\Modules
C:\Program Files\WindowsPowerShell\Modules
C:\Windows\system32\WindowsPowerShell\v1.0\Modules
Copy Nuget to the “C:\Program Files\PackageManagement\ProviderAssemblies” and register using the following command
Register-PSRepository -Name Local -SourceLocation 'C:\AsBuildOffline\Packages' -InstallationPolicy Trusted
Copy the PowerShell-modules to “C:\Program Files\WindowsPowerShell\Modules” and import
PowerCli:
[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12
Set-ExecutionPolicy RemoteSigned
Get-ChildItem -Path 'C:\Program Files\WindowsPowerShell\Modules\VMware.*\' -Recurse | Unblock-File
Import-Module VMware.PowerCLI
Get-Module -Name VMware* -ListAvailable | Select Name,Version
VMware.PowerCLI 13.3.0.24145083
PScribo:
Import-Module PScribo
AsBuilt:
Import-Module -Name 'AsBuiltReport.Core'
Import-Module 'AsBuiltReport.VMware.Horizon'
Import-Module 'AsBuiltReport.VMware.AppVolumes'
Import-Module 'AsBuiltReport.VMware.UAG'
Import-Module 'AsBuiltReport.VMware.vSphere'
Import-Module 'AsBuiltReport.NetApp.ONTAP'
Create AsBuild Report Configuration json-files:
New-AsBuiltReportConfig -Report VMware.Horizon -FolderPath 'C:\AsBuildOffline' -Filename 'AsBuiltHorizon'
New-AsBuiltReportConfig -Report VMware.AppVolumes -FolderPath 'C:\AsBuildOffline' -Filename 'AsBuiltAppVolumes'
New-AsBuiltReportConfig -Report VMware.UAG -FolderPath 'C:\AsBuildOffline' -Filename 'AsBuiltUAG'
New-AsBuiltReportConfig -Report VMware.vSphere -FolderPath 'C:\AsBuildOffline' -Filename 'AsBuiltvSphere'
New-AsBuiltReportConfig -Report NetApp.ONTAP -FolderPath 'C:\AsBuildOffline' -Filename 'AsBuiltNetApp'
I’m now ready to create detailed As Built documentation of my Air-Gapped Environments. I create the reports from a server with free line of sight to the Horizon and vCenter targets, which means that the necessary firewall openings has to be be in place. The necessary syntax for creating the different reports are described in the different modules on GitHub, but these are the ones I use most:
Horizon:
New-AsBuiltReport -Report VMware.Horizon -Target 'fqdn connection server' -Username 'admin username' -Password 'password' -Format Html -OutputFolderPath 'C:\AsBuildOffline\AsBuiltReports\Horizon' -ReportConfigFilePath 'C:\AsBuildOffline\AsBuiltHorizon.json' -Verbose
App Volumes:
New-AsBuiltReport -Report VMware.AppVolumes -Target 'fqdn app volumes server' -Username 'admin username' -Password 'password' -Format Html -OutputFolderPath 'C:\AsBuildOffline\AsBuiltReports\AppVolumes' -ReportConfigFilePath 'C:\AsBuildOffline\AsBuiltAppVolumes.json' -Verbose
Unified Access Gateway:
New-AsBuiltReport -Report VMware.UAG -Target 'fqdn uag' -Username 'admin username' -Password 'password' -Format Html -OutputFolderPath 'C:\AsBuildOffline\AsBuiltReports\UAG' -ReportConfigFilePath 'C:\AsBuildOffline\AsBuiltUAG.json' -Verbose
vSphere:
New-AsBuiltReport -Report VMware.vSphere -Target 'fqdn vcenter server' -Username 'admin username' -Password 'password' -Format Text,Html,Word -OutputFolderPath 'C:\AsBuildOffline\AsBuiltReports\vSphere' -ReportConfigFilePath 'C:\AsBuildOffline\AsBuiltvSphere.json' -Verbose
As I mentioned to begin with, this is a Must-Have for Lazy Admins and a highly recommended tool for system documentation. I hope this will save someone else as much time as it has done for me….
Disclaimer: Every tips/tricks/posting I have published here, is tried and tested in different it-solutions. It is not guaranteed to work everywhere, but is meant as a tip for other users out there. Remember, Google is your friend and don’t be afraid to steal with pride! Feel free to comment below as needed.