You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: Src/Public/Invoke-AsBuiltReport.VMware.vSphere.ps1
+11-2Lines changed: 11 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -19,6 +19,13 @@ function Invoke-AsBuiltReport.VMware.vSphere {
19
19
[PSCredential] $Credential
20
20
)
21
21
22
+
# Check if VMware PowerCLI 10.0 or higher is installed
23
+
$RequiredModules=Get-Module-ListAvailable -Name 'VMware.PowerCLI'|Sort-Object-Property Version -Descending |Select-Object-First 1
24
+
if ($RequiredModules.Version.Major-lt10) {
25
+
Write-Warning-Message "VMware PowerCLI 10.0 or higher is required to run the VMware vSphere As Built Report. Run 'Install-Module -Name VMware.PowerCLI -MinimumVersion 10.0' to install the required modules."
26
+
break
27
+
}
28
+
22
29
# Import Report Configuration
23
30
$Report=$ReportConfig.Report
24
31
$InfoLevel=$ReportConfig.InfoLevel
@@ -336,6 +343,7 @@ function Invoke-AsBuiltReport.VMware.vSphere {
336
343
}
337
344
$TableParams=@{
338
345
Name="Tags - $vCenterServerName"
346
+
ColumnWidths=30,40,30
339
347
}
340
348
if ($Report.ShowTableCaptions) {
341
349
$TableParams['Caption'] ="- $($TableParams.Name)"
@@ -358,7 +366,7 @@ function Invoke-AsBuiltReport.VMware.vSphere {
358
366
}
359
367
$TableParams=@{
360
368
Name="Tag Categories - $vCenterServerName"
361
-
ColumnWidths=40,40,20
369
+
ColumnWidths=30,40,30
362
370
}
363
371
if ($Report.ShowTableCaptions) {
364
372
$TableParams['Caption'] ="- $($TableParams.Name)"
@@ -381,6 +389,7 @@ function Invoke-AsBuiltReport.VMware.vSphere {
381
389
}
382
390
$TableParams=@{
383
391
Name="Tag Assignments - $vCenterServerName"
392
+
ColumnWidths=30,40,30
384
393
}
385
394
if ($Report.ShowTableCaptions) {
386
395
$TableParams['Caption'] ="- $($TableParams.Name)"
@@ -1469,7 +1478,7 @@ function Invoke-AsBuiltReport.VMware.vSphere {
0 commit comments