Skip to content

Commit 1ee33b1

Browse files
authored
Merge pull request #133 from benwa/patch-1
Protect against inaccessible datastores
2 parents 7c9f411 + 60e229f commit 1ee33b1

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Src/Public/Invoke-AsBuiltReport.VMware.vSphere.ps1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -163,7 +163,7 @@ function Invoke-AsBuiltReport.VMware.vSphere {
163163
#region Tag Information
164164
Try {
165165
Write-PScriboMessage "Collecting tag information."
166-
$TagAssignments = Get-TagAssignment -Server $vCenter
166+
$TagAssignments = Get-TagAssignment -Server $vCenter -ErrorAction SilentlyContinue
167167
$Tags = Get-Tag -Server $vCenter | Sort-Object Name, Category
168168
$TagCategories = Get-TagCategory -Server $vCenter | Sort-Object Name | Select-Object Name, Description, Cardinality -Unique
169169
} Catch {

0 commit comments

Comments
 (0)