Skip to content

Commit 3a3b5ed

Browse files
authored
Merge pull request #27 from AsBuiltReport/dev
v0.4.5 public release
2 parents 9ae707d + 15f0562 commit 3a3b5ed

3 files changed

Lines changed: 27 additions & 3 deletions

File tree

AsBuiltReport.VMware.SRM.psd1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
RootModule = 'AsBuiltReport.VMware.SRM.psm1'
1313

1414
# Version number of this module.
15-
ModuleVersion = '0.4.4'
15+
ModuleVersion = '0.4.5'
1616

1717
# Supported PSEditions
1818
# CompatiblePSEditions = @()

CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,11 @@
11
# :arrows_clockwise: VMware SRM As Built Report Changelog
22

3+
## [0.4.5] - 2023-11-09
4+
5+
### Fixed
6+
7+
- Fix issue where if a protection group was not protecting any VMs, it would list the VMs in the previous protection group in the output. @flynngw
8+
39
## [0.4.4] - 2023-08-25
410

511
### Fixed

Src/Private/Get-AbrSRMProtectionGroup.ps1

Lines changed: 20 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ function Get-AbrSRMProtectionGroup {
55
.DESCRIPTION
66
Documents the configuration of VMware SRM in Word/HTML/Text formats using PScribo.
77
.NOTES
8-
Version: 0.4.2
8+
Version: 0.4.5
99
Author: Jonathan Colon & Tim Carman
1010
Twitter: @jcolonfzenpr / @tpcarman
1111
Github: @rebelinux / @tpcarman
@@ -83,6 +83,9 @@ function Get-AbrSRMProtectionGroup {
8383
if ($ProtectionGroup.ListProtectedVMs()) {
8484
$ProtectedVMs = ConvertTo-VIobject $ProtectionGroup.ListProtectedVMs().vm.MoRef
8585
}
86+
else {
87+
$ProtectedVMs = ""
88+
}
8689

8790
$inObj = [ordered] @{
8891
'Name' = $ProtectionGroupInfo.Name
@@ -117,9 +120,15 @@ function Get-AbrSRMProtectionGroup {
117120
if ($ProtectionGroup.ListProtectedVMs()) {
118121
$ProtectedVMs = ConvertTo-VIobject $ProtectionGroup.ListProtectedVMs().vm.MoRef
119122
}
123+
else {
124+
$ProtectedVMs = ""
125+
}
120126
if ($ProtectionGroup.ListAssociatedVms()) {
121127
$AssociatedVMs = ConvertTo-VIobject $ProtectionGroup.ListAssociatedVms().MoRef
122128
}
129+
else {
130+
$AssociatedVMs = ""
131+
}
123132

124133
$inObj = [ordered] @{
125134
'Name' = $ProtectionGroupInfo.Name
@@ -161,6 +170,9 @@ function Get-AbrSRMProtectionGroup {
161170
if ($ProtectionGroup.ListProtectedVMs()) {
162171
$ProtectedVMs = ConvertTo-VIobject $ProtectionGroup.ListProtectedVMs().vm.MoRef
163172
}
173+
else {
174+
$ProtectedVMs = ""
175+
}
164176

165177
if ($ProtectionGroup.ListProtectedDatastores()) {
166178
$ProtectedDatastores = ConvertTo-VIobject $ProtectionGroup.ListProtectedDatastores().MoRef
@@ -197,6 +209,9 @@ function Get-AbrSRMProtectionGroup {
197209
if ($ProtectionGroup.ListProtectedVMs()) {
198210
$ProtectedVMs = ConvertTo-VIobject $ProtectionGroup.ListProtectedVMs().vm.MoRef
199211
}
212+
else {
213+
$ProtectedVMs = ""
214+
}
200215

201216
if ($ProtectionGroup.ListProtectedDatastores()) {
202217
$ProtectedDatastores = ConvertTo-VIobject $ProtectionGroup.ListProtectedDatastores().MoRef
@@ -248,6 +263,9 @@ function Get-AbrSRMProtectionGroup {
248263
if ($ProtectionGroup.ListProtectedVMs()) {
249264
$ProtectedVMs = $ProtectionGroup.ListProtectedVMs()
250265
}
266+
else {
267+
$ProtectedVMs = ""
268+
}
251269
if ($InfoLevel.ProtectionGroup -eq 2) {
252270
foreach ($ProtectedVM in $ProtectedVMs) {
253271
try {
@@ -349,4 +367,4 @@ function Get-AbrSRMProtectionGroup {
349367
}
350368
}
351369
end {}
352-
}
370+
}

0 commit comments

Comments
 (0)