Skip to content

Commit 3f7b657

Browse files
authored
Merge pull request #30 from AsBuiltReport/dev
v0.4.6 public release
2 parents 3a3b5ed + 32590bd commit 3f7b657

19 files changed

+243
-204
lines changed

.github/workflows/PSScriptAnalyzer.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ jobs:
55
name: Run PSScriptAnalyzer
66
runs-on: ubuntu-latest
77
steps:
8-
- uses: actions/checkout@v3
8+
- uses: actions/checkout@v4
99
- name: lint
1010
uses: devblackops/github-action-psscriptanalyzer@master
1111
with:

.github/workflows/Release.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ jobs:
88
publish-to-gallery:
99
runs-on: ubuntu-latest
1010
steps:
11-
- uses: actions/checkout@v3
11+
- uses: actions/checkout@v4
1212
- name: Set PSRepository to Trusted for PowerShell Gallery
1313
shell: pwsh
1414
run: |
@@ -25,7 +25,7 @@ jobs:
2525
needs: publish-to-gallery
2626
runs-on: ubuntu-latest
2727
steps:
28-
- uses: Eomm/why-don-t-you-tweet@v1
28+
- uses: Eomm/why-don-t-you-tweet@v2
2929
# We don't want to tweet if the repository is not a public one
3030
if: ${{ !github.event.repository.private }}
3131
with:

.github/workflows/codeql.yml

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
# This workflow uses actions that are not certified by GitHub.
2+
# They are provided by a third-party and are governed by
3+
# separate terms of service, privacy policy, and support
4+
# documentation.
5+
#
6+
# https://github.com/microsoft/action-psscriptanalyzer
7+
# For more information on PSScriptAnalyzer in general, see
8+
# https://github.com/PowerShell/PSScriptAnalyzer
9+
10+
name: CodeQL
11+
12+
on:
13+
push:
14+
branches: [ "dev" ]
15+
pull_request:
16+
branches: [ "dev" ]
17+
18+
permissions:
19+
contents: read
20+
21+
jobs:
22+
build:
23+
permissions:
24+
contents: read # for actions/checkout to fetch code
25+
security-events: write # for github/codeql-action/upload-sarif to upload SARIF results
26+
actions: read # only required for a private repository by github/codeql-action/upload-sarif to get the Action run status
27+
name: PSScriptAnalyzer
28+
runs-on: ubuntu-latest
29+
steps:
30+
- uses: actions/checkout@v4
31+
32+
- name: Run PSScriptAnalyzer
33+
uses: microsoft/psscriptanalyzer-action@v1.1
34+
with:
35+
# Check https://github.com/microsoft/action-psscriptanalyzer for more info about the options.
36+
# The below set up runs PSScriptAnalyzer to your entire repository and runs some basic security rules.
37+
path: .\
38+
recurse: true
39+
# Include your own basic security rules. Removing this option will run all the rules
40+
excludeRule: '"PSAvoidUsingPlainTextForPassword", "PSAvoidUsingUsernameAndPasswordParams", "PSAvoidUsingConvertToSecureStringWithPlainText"'
41+
output: results.sarif
42+
43+
# Upload the SARIF file generated in the previous step
44+
- name: Upload SARIF results file
45+
uses: github/codeql-action/upload-sarif@v2
46+
with:
47+
sarif_file: results.sarif

AsBuiltReport.VMware.SRM.psd1

Lines changed: 2 additions & 2 deletions
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.5'
15+
ModuleVersion = '0.4.6'
1616

1717
# Supported PSEditions
1818
# CompatiblePSEditions = @()
@@ -54,7 +54,7 @@ PowerShellVersion = '5.1'
5454
RequiredModules = @(
5555
@{
5656
ModuleName = 'AsBuiltReport.Core';
57-
ModuleVersion = '1.3.0'
57+
ModuleVersion = '1.4.0'
5858
}
5959
)
6060

CHANGELOG.md

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

3+
## [0.4.6] - 2024-11-04
4+
5+
### Changed
6+
7+
- Changed Required Modules to AsBuiltReport.Core v1.4.0
8+
9+
### Fixed
10+
11+
- Fix [#28](https://github.com/AsBuiltReport/AsBuiltReport.VMware.SRM/issues/28)
12+
313
## [0.4.5] - 2023-11-09
414

515
### Fixed

README.md

Lines changed: 34 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -60,8 +60,8 @@ Tested On:
6060
This report is compatible with the following PowerShell versions;
6161

6262
<!-- ********** Update supported PowerShell versions ********** -->
63-
| Windows PowerShell 5.1 | PowerShell 7 |
64-
|:----------------------:|:--------------------:|
63+
| Windows PowerShell 5.1 | PowerShell 7 |
64+
| :--------------------: | :----------------: |
6565
| :white_check_mark: | :white_check_mark: |
6666

6767
## :wrench: System Requirements
@@ -125,23 +125,23 @@ The following provides information of how to configure each schema within the re
125125

126126
The **Report** schema provides configuration of the VMware SRM report information.
127127

128-
| Sub-Schema | Setting | Default | Description |
129-
|---------------------|--------------|--------------------------------|--------------------------------------------------------------|
128+
| Sub-Schema | Setting | Default | Description |
129+
| ------------------- | ------------ | -------------------------- | ------------------------------------------------------------ |
130130
| Name | User defined | VMware SRM As Built Report | The name of the As Built Report |
131-
| Version | User defined | 1.0 | The report version |
132-
| Status | User defined | Released | The report release status |
133-
| ShowCoverPageImage | true / false | true | Toggle to enable/disable the display of the cover page image |
134-
| ShowTableOfContents | true / false | true | Toggle to enable/disable table of contents |
135-
| ShowHeaderFooter | true / false | true | Toggle to enable/disable document headers & footers |
136-
| ShowTableCaptions | true / false | true | Toggle to enable/disable table captions/numbering |
131+
| Version | User defined | 1.0 | The report version |
132+
| Status | User defined | Released | The report release status |
133+
| ShowCoverPageImage | true / false | true | Toggle to enable/disable the display of the cover page image |
134+
| ShowTableOfContents | true / false | true | Toggle to enable/disable table of contents |
135+
| ShowHeaderFooter | true / false | true | Toggle to enable/disable document headers & footers |
136+
| ShowTableCaptions | true / false | true | Toggle to enable/disable table captions/numbering |
137137

138138
### Options
139139

140140
The **Options** schema allows certain options within the report to be toggled on or off.
141141

142-
| Sub-Schema | Setting | Default | Description |
143-
|-----------------|--------------|---------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
144-
| ShowDefinitionInfo | true / false | false | Toggle to enable/disable VMware SRM Section Documentation
142+
| Sub-Schema | Setting | Default | Description |
143+
| ------------------ | ------------ | ------- | --------------------------------------------------------- |
144+
| ShowDefinitionInfo | true / false | false | Toggle to enable/disable VMware SRM Section Documentation |
145145

146146
<!-- ********** Add/Remove the number of InfoLevels as required ********** -->
147147
### InfoLevel
@@ -150,30 +150,30 @@ The **InfoLevel** schema allows configuration of each section of the report at a
150150

151151
There are 4 levels (0-3) of detail granularity for each section as follows;
152152

153-
| Setting | InfoLevel | Description |
154-
|:-------:|-------------------|--------------------------------------------------------------------------------------------------------------------------------------------|
155-
| 0 | Disabled | Does not collect or display any information |
156-
| 1 | Enabled / Summary | Provides summarised information for a collection of objects |
157-
| 2 | Adv Summary | Provides condensed, detailed information for a collection of objects |
158-
| 3 | Detailed | Provides detailed information for individual objects |
153+
| Setting | InfoLevel | Description |
154+
| :-----: | ----------------- | -------------------------------------------------------------------- |
155+
| 0 | Disabled | Does not collect or display any information |
156+
| 1 | Enabled / Summary | Provides summarised information for a collection of objects |
157+
| 2 | Adv Summary | Provides condensed, detailed information for a collection of objects |
158+
| 3 | Detailed | Provides detailed information for individual objects |
159159

160160
The table below outlines the default and maximum **InfoLevel** settings for each section.
161161

162-
| Sub-Schema | Default Setting | Maximum Setting |
163-
|--------------|:---------------:|:---------------:|
164-
| ArrayPairs | 1 | 1 |
165-
| SRA | 1 | 1 |
166-
| Sites | 1 | 1 |
167-
| License | 1 | 1 |
168-
| Summary | 1 | 1 |
169-
| FolderMapping | 1 | 1 |
170-
| NetworkMapping | 1 | 1 |
171-
| ResourceMapping | 1 | 1 |
172-
| PlaceholderDatastores | 1 | 1 |
173-
| Permission | 1 | 1 |
174-
| ProtectionGroup | 1 | 3 |
175-
| RecoveryPlan | 1 | 3 |
176-
| Permission | 1 | 1 |
162+
| Sub-Schema | Default Setting | Maximum Setting |
163+
| --------------------- | :-------------: | :-------------: |
164+
| ArrayPairs | 1 | 1 |
165+
| SRA | 1 | 1 |
166+
| Sites | 1 | 1 |
167+
| License | 1 | 1 |
168+
| Summary | 1 | 1 |
169+
| FolderMapping | 1 | 1 |
170+
| NetworkMapping | 1 | 1 |
171+
| ResourceMapping | 1 | 1 |
172+
| PlaceholderDatastores | 1 | 1 |
173+
| Permission | 1 | 1 |
174+
| ProtectionGroup | 1 | 3 |
175+
| RecoveryPlan | 1 | 3 |
176+
| Permission | 1 | 1 |
177177

178178
### Healthcheck
179179

Src/Private/Get-AbrSRMArrayPairs.ps1 renamed to Src/Private/Get-AbrSRMArrayPair.ps1

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
1-
function Get-AbrSRMArrayPairs {
1+
function Get-AbrSRMArrayPair {
22
<#
33
.SYNOPSIS
44
Used by As Built Report to retrieve VMware SRM Array Pairs information.
55
.DESCRIPTION
66
Documents the configuration of VMware SRM in Word/HTML/Text formats using PScribo.
77
.NOTES
8-
Version: 0.4.3
8+
Version: 0.4.6
99
Author: Tim Carman
1010
Twitter: @tpcarman
1111
Github: @tpcarman
@@ -21,10 +21,10 @@ function Get-AbrSRMArrayPairs {
2121
try {
2222
try {
2323
$LocalArrayPair = $LocalSRM.ExtensionData.Storage.QueryArrayManagers().GetArrayInfo()
24-
} catch { Write-PScriboMessage -IsWarning "Unable to get Protected Site array information"}
24+
} catch { Write-PScriboMessage -IsWarning "Unable to get Protected Site array information" }
2525
try {
2626
$RemoteArrayPair = $RemoteSRM.ExtensionData.Storage.QueryArrayManagers().GetArrayInfo()
27-
} catch { Write-PScriboMessage -IsWarning "Unable to get Recovery Site array information"}
27+
} catch { Write-PScriboMessage -IsWarning "Unable to get Recovery Site array information" }
2828

2929
if (($LocalArrayPair) -and ($RemoteArrayPair)) {
3030
Section -Style Heading2 'Array Pairs' {
@@ -42,13 +42,13 @@ function Get-AbrSRMArrayPairs {
4242
"$($ProtectedSiteName)" = "$($HashObj.Keys) <--> $($HashObj.Values)"
4343
"$($RecoverySiteName)" = "$($HashObj.Values) <--> $($HashObj.Keys)"
4444
}
45-
$OutObj += [pscustomobject]$inobj
45+
$OutObj += [pscustomobject](ConvertTo-HashToYN $inObj)
4646

4747

4848
$TableParams = @{
4949
Name = "Array Pairs"
5050
List = $false
51-
ColumnWidths = 50,50
51+
ColumnWidths = 50, 50
5252
}
5353
if ($Report.ShowTableCaptions) {
5454
$TableParams['Caption'] = "- $($TableParams.Name)"
@@ -63,4 +63,4 @@ function Get-AbrSRMArrayPairs {
6363

6464
end {}
6565

66-
}
66+
}

Src/Private/Get-AbrSRMFolderMapping.ps1

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ function Get-AbrSRMFolderMapping {
55
.DESCRIPTION
66
Documents the configuration of VMware SRM in Word/HTML/Text formats using PScribo.
77
.NOTES
8-
Version: 0.4.0
8+
Version: 0.4.6
99
Author: Jonathan Colon & Tim Carman
1010
Twitter: @jcolonfzenpr / @tpcarman
1111
Github: @rebelinux / @tpcarman
@@ -28,7 +28,7 @@ function Get-AbrSRMFolderMapping {
2828
Section -Style Heading2 'Folder Mappings' {
2929
if ($Options.ShowDefinitionInfo) {
3030
Paragraph "Folder mappings allow you to specify how Site Recovery Manager maps virtual machine folders on the protected site to virtual machine folders on the recovery site."
31-
Blankline
31+
BlankLine
3232
}
3333
$OutObj = @()
3434
foreach ($ObjMap in $FolderMappings) {
@@ -43,7 +43,7 @@ function Get-AbrSRMFolderMapping {
4343
"$($ProtectedSiteName)" = $HashObj.Keys
4444
"$($RecoverySiteName)" = $HashObj.Values
4545
}
46-
$OutObj += [pscustomobject]$inobj
46+
$OutObj += [pscustomobject](ConvertTo-HashToYN $inObj)
4747
} catch {
4848
Write-PScriboMessage -IsWarning $_.Exception.Message
4949
}

Src/Private/Get-AbrSRMNetworkMapping.ps1

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ function Get-AbrSRMNetworkMapping {
55
.DESCRIPTION
66
Documents the configuration of VMware SRM in Word/HTML/Text formats using PScribo.
77
.NOTES
8-
Version: 0.4.0
8+
Version: 0.4.6
99
Author: Jonathan Colon & Tim Carman
1010
Twitter: @jcolonfzenpr / @tpcarman
1111
Github: @rebelinux / @tpcarman
@@ -31,7 +31,7 @@ function Get-AbrSRMNetworkMapping {
3131
Section -Style Heading2 'Network Mappings' {
3232
if ($Options.ShowDefinitionInfo) {
3333
Paragraph "Network mappings allow you to specify how Site Recovery Manager maps virtual machine networks on the protected site to virtual machine networks on the recovery site."
34-
Blankline
34+
BlankLine
3535
}
3636

3737
if ($LocalNetworkMappings) {
@@ -42,14 +42,14 @@ function Get-AbrSRMNetworkMapping {
4242
'Protected Network' = Get-View $ObjMap.PrimaryObject -Server $LocalvCenter | Select-Object -ExpandProperty Name -Unique
4343
'Recovery Network' = Get-View $ObjMap.SecondaryObject -Server $RemotevCenter | Select-Object -ExpandProperty Name -Unique
4444
'Test Network' = & {
45-
if ($LocalTestNetworkMappings | Where-Object {$_.Key -eq $ObjMap.SecondaryObject}) {
46-
Get-View (($LocalTestNetworkMappings | Where-Object {$_.Key -eq $ObjMap.SecondaryObject}).TestNetwork) -Server $LocalvCenter
45+
if ($LocalTestNetworkMappings | Where-Object { $_.Key -eq $ObjMap.SecondaryObject }) {
46+
Get-View (($LocalTestNetworkMappings | Where-Object { $_.Key -eq $ObjMap.SecondaryObject }).TestNetwork) -Server $LocalvCenter
4747
} else {
4848
'Isolated network (auto created)'
4949
}
5050
}
5151
}
52-
$OutObj += [pscustomobject]$inobj
52+
$OutObj += [pscustomobject](ConvertTo-HashToYN $inObj)
5353
}
5454

5555
$TableParams = @{
@@ -74,14 +74,14 @@ function Get-AbrSRMNetworkMapping {
7474
'Protected Network' = Get-View $ObjMap.PrimaryObject -Server $RemotevCenter | Select-Object -ExpandProperty Name -Unique
7575
'Recovery Network' = Get-View $ObjMap.SecondaryObject -Server $LocalvCenter | Select-Object -ExpandProperty Name -Unique
7676
'Test Network' = & {
77-
if ($RemoteTestNetworkMappings | Where-Object {$_.Key -eq $ObjMap.SecondaryObject}) {
78-
Get-View (($RemoteTestNetworkMappings | Where-Object {$_.Key -eq $ObjMap.SecondaryObject}).TestNetwork) -Server $RemotevCenter
77+
if ($RemoteTestNetworkMappings | Where-Object { $_.Key -eq $ObjMap.SecondaryObject }) {
78+
Get-View (($RemoteTestNetworkMappings | Where-Object { $_.Key -eq $ObjMap.SecondaryObject }).TestNetwork) -Server $RemotevCenter
7979
} else {
8080
'Isolated network (auto created)'
8181
}
8282
}
8383
}
84-
$OutObj += [pscustomobject]$inobj
84+
$OutObj += [pscustomobject](ConvertTo-HashToYN $inObj)
8585
}
8686

8787
$TableParams = @{

0 commit comments

Comments
 (0)