Skip to content

Commit 5e3f93f

Browse files
authored
Merge pull request #42 from AsBuiltReport/dev
v1.3.0 release
2 parents ecdc327 + 522c970 commit 5e3f93f

14 files changed

+537
-305
lines changed

.github/ISSUE_TEMPLATE/bug_report.md

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -21,11 +21,9 @@ A clear and concise description of what you expected to happen.
2121
If applicable, add screenshots to help explain your problem.
2222

2323
**System (please provide the following information about the system from which you are trying to generate a report):**
24-
- OS: [e.g. Windows 10]
25-
- Windows PowerShell version [Provide output from the following command: `$PSVersionTable.PSVersion`]
26-
- Vendor PowerShell Module name and version [e.g. VMware PowerCLI 11.2]
27-
- AsBuiltReport.Core module version [e.g. 1.0.0]
28-
- AsBuiltReport module name and version [e.g. AsBuiltReport.VMware.vSphere 1.0.0]
24+
- Operating System: [e.g. Windows 10, macOS 12, Ubuntu 20.04]
25+
- PowerShell version [Provide output from the following command: `$PSVersionTable`]
26+
- AsBuiltReport.Core module version [Provide output from the following command: `Get-Module -ListAvailable AsBuiltReport.Core`]
2927

3028
**Additional context**
3129
Add any other context about the problem here.

.github/ISSUE_TEMPLATE/feature_request.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ about: Suggest an idea for this project
55
---
66

77
**Is your feature request related to a problem? Please describe.**
8-
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
8+
A clear and concise description of what the problem is. e.g. I'm always frustrated when [...]
99

1010
**Describe the solution you'd like**
1111
A clear and concise description of what you want to happen.

.github/PULL_REQUEST_TEMPLATE.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,4 +31,4 @@
3131
- [ ] My code follows the code style of this project.
3232
- [ ] My change requires a change to the documentation.
3333
- [ ] I have updated the documentation accordingly.
34-
- [ ] I have read the [**CONTRIBUTING**](/CONTRIBUTING.md) document.
34+
- [ ] I have read the [**CONTRIBUTING**](/CONTRIBUTING.md) page.

.github/workflows/PSScriptAnalyzerSettings.psd1

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@
33
'PSUseToExportFieldsInManifest',
44
'PSReviewUnusedParameter',
55
'PSUseDeclaredVarsMoreThanAssignments',
6-
'PSAvoidGlobalVars'
6+
'PSAvoidGlobalVars',
7+
'PSAvoidUsingConvertToSecureStringWithPlainText',
8+
'PSAvoidUsingUsernameAndPasswordParams'
79
)
810
}

.github/workflows/Release.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,11 +17,16 @@ jobs:
1717
shell: pwsh
1818
run: |
1919
Install-Module -Name PScribo -Repository PSGallery -Force
20+
- name: Test Module Manifest
21+
shell: pwsh
22+
run: |
23+
Test-ModuleManifest .\AsBuiltReport.Core.psd1
2024
- name: Publish module to PowerShell Gallery
2125
shell: pwsh
2226
run: |
2327
Publish-Module -Path ./ -NuGetApiKey ${{ secrets.PSGALLERY_API_KEY }} -Verbose
2428
tweet:
29+
needs: publish-to-gallery
2530
runs-on: ubuntu-latest
2631
steps:
2732
- uses: Eomm/why-don-t-you-tweet@v1

AsBuiltReport.Core.psd1

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313

1414
# Version number of this module.
1515

16-
ModuleVersion = '1.2.0'
16+
ModuleVersion = '1.3.0'
1717

1818
# Supported PSEditions
1919
# CompatiblePSEditions = 'Desktop'
@@ -28,13 +28,13 @@
2828
# CompanyName = ''
2929

3030
# Copyright statement for this module
31-
Copyright = '(c) 2020 Tim Carman. All rights reserved.'
31+
Copyright = '(c) 2022 Tim Carman. All rights reserved.'
3232

3333
# Description of the functionality provided by this module
3434
Description = 'A PowerShell module which provides the core framework for generating As-Built documentation for many common datacentre systems.'
3535

3636
# Minimum version of the Windows PowerShell engine required by this module
37-
PowerShellVersion = '5.1'
37+
# PowerShellVersion = '5.1'
3838

3939
# Name of the Windows PowerShell host required by this module
4040
# PowerShellHostName = ''
@@ -55,7 +55,7 @@
5555
RequiredModules = @(
5656
@{
5757
ModuleName = 'PScribo';
58-
ModuleVersion = '0.9.1'
58+
ModuleVersion = '0.10.0'
5959
}
6060
)
6161

CHANGELOG.md

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,17 @@
1-
# :arrows_counterclockwise: AsBuiltReport.Core Changelog
1+
# :arrows_clockwise: AsBuiltReport.Core Changelog
2+
3+
## [1.3.0] - 2022-10-22
4+
5+
### Added
6+
- Added two sample style scripts
7+
### Changed
8+
- Updated `RequiredModules` for PScribo 0.10.0
9+
- Updated installation instructions in `README.md`
10+
- Updated contributing guide in `CONTRIBUTING.md`
11+
- Updated PSScriptAnalyzer settings
12+
- Updated GitHub issue templates
13+
- Updated comment based help for AsBuiltReport cmdlets
14+
- Improved command functionality for macOS and Linux users
215

316
## [1.2.0] - 2022-02-11
417
### Added

CONTRIBUTING.md

Lines changed: 90 additions & 185 deletions
Large diffs are not rendered by default.

README.md

Lines changed: 73 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,10 @@
2323
<img src="https://img.shields.io/twitter/follow/AsBuiltReport.svg?style=social"/></a>
2424
</p>
2525

26+
<p align="center">
27+
<a href='https://ko-fi.com/B0B7DDGZ7' target='_blank'><img height='36' style='border:0px;height:36px;' src='https://cdn.ko-fi.com/cdn/kofi1.png?v=3' border='0' alt='Buy Me a Coffee at ko-fi.com' /></a>
28+
</p>
29+
2630
# AsBuiltReport.Core
2731

2832
AsBuiltReport.Core is a PowerShell module which provides the core framework for generating as built documentation for many common datacentre systems. The AsBuiltReport.Core module is required by each individual report module used to generate as built documentation for a specific product and/or technology.
@@ -33,21 +37,21 @@ The following simple list of instructions will get you started with the AsBuiltR
3337

3438
## :floppy_disk: Supported Versions
3539
### **PowerShell**
36-
This report is compatible with the following PowerShell versions;
40+
This module is compatible with the following PowerShell versions;
3741

3842
| Windows PowerShell 5.1 | PowerShell 7 |
3943
|:----------------------:|:------------------:|
4044
| :white_check_mark: | :white_check_mark: |
4145

4246
## :wrench: System Requirements
4347

44-
The following module will be automatically installed by following the [module installation](https://github.com/AsBuiltReport/AsBuiltReport.Core#package-module-installation) procedure.
48+
The following PowerShell module will be automatically installed by following the [module installation](https://github.com/AsBuiltReport/AsBuiltReport.Core#package-module-installation) procedure.
4549

46-
This module may also be manually installed.
50+
This PowerShell module may also be manually installed via the PowerShell Gallery or GitHub.
4751

4852
| Module Name | Minimum Required Version | PS Gallery | GitHub |
4953
|--------------------|:------------------------:|:---------------------------------------------------------------------:|:---------------------------------------------------------------------------:|
50-
| PScribo | 0.9.1 | [Link](https://www.powershellgallery.com/packages/PScribo) | [Link](https://github.com/iainbrighton/PScribo/tree/master)
54+
| PScribo | 0.10.0 | [Link](https://www.powershellgallery.com/packages/PScribo) | [Link](https://github.com/iainbrighton/PScribo/tree/master)
5155

5256
To find a list of available report modules, run the following PowerShell command;
5357

@@ -59,19 +63,53 @@ The pre-requisites for each report type will be documented within its own `READM
5963

6064
## :package: Module Installation
6165

62-
### **PowerShell**
63-
Open a PowerShell terminal window and install the required module as follows;
66+
### PowerShell
67+
#### Online Installation
68+
69+
For an online installation, install the `AsBuiltReport.Core` module using the [PowerShell Gallery](https://www.powershellgallery.com/packages?q=Asbuiltreport.Core);
70+
71+
```powershell
72+
# Install AsBuiltReport module
73+
Install-Module -Name 'AsBuiltReport.Core' -Repository 'PSGallery' -Scope 'CurrentUser'
74+
```
75+
76+
#### Offline Installation
77+
78+
For an offline installation, perform the following steps from a machine with internet connectivity;
79+
80+
Save the required `AsBuiltReport.Core` module to a specified folder.
81+
6482
```powershell
65-
install-module AsBuiltReport.Core
83+
# Save AsBuiltReport.Core module
84+
Save-Module -Name 'AsBuiltReport.Core' -Repository 'PSGallery' -Path '<Folder Path>'
6685
```
6786

87+
Copy the downloaded `AsBuiltReport.Core` module folder to a location that can be made accessible to the offline system.
88+
e.g. USB Flash Drive, Internal File Share etc.
89+
90+
On the offline system, open a PowerShell console window and run the following command to determine the PowerShell module path.
91+
92+
**Windows**
93+
94+
```powershell title=""
95+
$env:PSModulePath -Split ';'
96+
```
97+
98+
**macOS & Linux**
99+
100+
```powershell title=""
101+
$env:PSModulePath -Split ':'
102+
```
103+
104+
Copy the downloaded `AsBuiltReport.Core` module folder to a folder specified in the `$env:PSModulePath` output.
105+
68106
### **GitHub**
69-
If you are unable to use the PowerShell Gallery, you can still install the module manually. Ensure you repeat the following steps for the [system requirements](https://github.com/AsBuiltReport/AsBuiltReport.Core#wrench-system-requirements) also.
107+
If you are unable to use the PowerShell Gallery, you can still install the `AsBuiltReport.Core` module manually. Ensure you repeat the following steps for the [system requirements](https://github.com/AsBuiltReport/AsBuiltReport.Core#wrench-system-requirements) also.
70108

71109
1. Download the [latest release](https://github.com/AsBuiltReport/AsBuiltReport.Core/releases/latest) zip from GitHub
72110
2. Extract the zip file
73-
3. Copy the folder `AsBuiltReport.Core` to a path that is set in `$env:PSModulePath`. By default this could be `C:\Program Files\WindowsPowerShell\Modules` or `C:\Users\<user>\Documents\WindowsPowerShell\Modules`
74-
4. Open a PowerShell terminal window and unblock the downloaded files with
111+
3. Copy the folder `AsBuiltReport.Core` to a path that is set in `$env:PSModulePath`.
112+
4. For Windows users only, open a PowerShell terminal window and unblock the downloaded files with
75113
```powershell
76114
$path = (Get-Module -Name AsBuiltReport.Core -ListAvailable).ModuleBase; Unblock-File -Path $path\*.psd1; Unblock-File -Path $path\Src\Public\*.ps1
77115
```
@@ -158,11 +196,13 @@ The `New-AsBuiltReportConfig` cmdlet is used to create JSON configuration files
158196
.PARAMETER Force
159197
Specifies to overwrite any existing report JSON configuration file
160198
.EXAMPLE
161-
Creates a report JSON configuration file for VMware vSphere, named 'vSphere_Report_Config' in 'C:\Reports' folder.
162199
New-AsBuiltReportConfig -Report VMware.vSphere -FolderPath 'C:\Reports' -Filename 'vSphere_Report_Config'
200+
201+
Creates a VMware vSphere report configuration file named 'vSphere_Report_Config.json' in the 'C:\Reports' folder.
163202
.EXAMPLE
164-
Creates a report JSON configuration file for Nutanix Prism Central, named 'AsBuiltReport.Nutanix.PrismCentral' in 'C:\Reports' folder, overwriting any existing file.
165-
New-AsBuiltReportConfig -Report Nutanix.PrismCentral -FolderPath 'C:\Reports' -Force
203+
New-AsBuiltReportConfig -Report Nutanix.PrismElement -FolderPath '/Users/Tim/Reports' -Force
204+
205+
Creates a Nutanix Prism Element report configuration file name 'AsBuiltReport.Nutanix.PrismElement.json' in '/Users/Tim/Reports' folder and overwrites the existing file.
166206
```
167207

168208
```powershell
@@ -173,36 +213,38 @@ Get-Help New-AsBuiltReportConfig -Full
173213
Here are some examples to get you going.
174214

175215
```powershell
176-
# The following creates a VMware vSphere As Built report in HTML & Word formats.
177-
# The document will highlight particular issues which exist within the environment by including the Healthchecks switch.
178-
PS C:\>New-AsBuiltReport -Report VMware.vSphere -Target 192.168.1.100 -Username admin -Password admin -Format HTML,Word -EnableHealthCheck -OutputFolderPath 'H:\Documents\'
216+
# Generate a VMware vSphere As Built report in HTML & Word formats. Perform a health check to highlight particular issues which exist within the Vmware vSphere environment. Save the report to the 'H:\Documents\' folder.
217+
New-AsBuiltReport -Report 'VMware.vSphere' -Target '192.168.1.100' -Username 'admin' -Password 'admin' -Format HTML,Word -EnableHealthCheck -OutputFolderPath 'H:\Documents\'
179218
180-
# The following creates a VMware vSphere As Built report in HTML & Word formats, while displaying Verbose messages to the console
181-
PS C:\>New-AsBuiltReport -Report VMware.vSphere -Target 192.168.1.100 -Username admin -Password admin -Format HTML,Word -OutputFolderPath 'H:\Documents\' -Verbose
219+
# Generate a Nutanix Prism Element As Built Report using specified username and password credentials. Specify the report configuration file to be used. Export report to Text, HTML & DOCX formats. Use the default report style. Save the report to the '/Users/Tim/Documents' folder. Display verbose messages to the console.
220+
New-AsBuiltReport -Report 'Nutanix.PrismElement' -Target 'prism.nutanix.local' -Username 'demo' -Password 'demo' -Format Text,Html,Word -OutputFolderPath '/Users/Tim/Documents' -ReportConfigFilePath '/Users/Tim/AsBuiltReport/AsBuiltReport.Nutanix.PrismElement.json' -Verbose
182221
183-
# The following creates a Pure Storage FlashArray As Built report in Text format and appends a timestamp to the filename. It also uses stored credentials to connect to the system.
184-
PS C:\>$Creds = Get-Credential
185-
PS C:\>New-AsBuiltReport -Report PureStorage.FlashArray -Target 192.168.1.100 -Credential $Creds -Format Text -Timestamp -OutputFolderPath 'H:\Documents\'
222+
# Generate a Pure Storage FlashArray As Built Report in Text format and append a timestamp to the filename. Use stored credentials for authentication. Use the default Pure Storage report style. Save the reports to the 'H:\Documents' folder.
223+
$Credentials = Get-Credential
224+
New-AsBuiltReport -Report 'PureStorage.FlashArray' -Target '192.168.1.100' -Credential $Credentials -Format Text -Timestamp -OutputFolderPath 'H:\Documents\'
186225
187226
# The following creates a Cisco UCS Manager As Built report in default format (Word) with a customised style.
188-
PS C:\>New-AsBuiltReport -Report Cisco.UCSManager -Target 192.168.1.100 -Username admin -Password admin -StyleFilePath 'C:\scripts\ACME.ps1' -OutputFolderPath 'H:\Documents\'
189-
190-
# The following creates a VMware NSX-V As Built report in HTML format, using the configuration in the asbuilt.json file located in the C:\scripts\ folder.
191-
PS C:\>New-AsBuiltReport -Report VMware.NSXv -Target 192.168.1.100 -Username admin -Password admin -Format HTML -AsBuiltConfigFilePath 'C:\scripts\asbuilt.json' -OutputFolderPath 'H:\Documents\'
227+
New-AsBuiltReport -Report 'Cisco.UCSManager' -Target '192.168.1.100' -Username 'admin' -Password 'admin' -StyleFilePath 'C:\scripts\ACME.ps1' -OutputFolderPath 'H:\Documents\'
192228
193229
# The following creates a Nutanix Prism Element As Built report in HTML format, with a custom filename.
194-
PS C:\>New-AsBuiltReport -Report VMware.NSXv -Target 192.168.1.100 -Username admin -Password admin -Format HTML -AsBuiltConfigFilePath 'C:\scripts\asbuilt.json' -OutputFolderPath 'H:\Documents\' -Filename 'My Nutanix Configuration'
230+
New-AsBuiltReport -Report 'Nutanix.PrismElement' -Target '192.168.1.100' -Username 'admin' -Password 'admin' -Format HTML -AsBuiltConfigFilePath 'C:\scripts\asbuilt.json' -OutputFolderPath 'H:\Documents\' -Filename 'My Nutanix Configuration'
195231
```
196232

197-
## :pencil: Notes
198-
- Table Of Contents (TOC) may be missing in Word formatted report
233+
## :x: Known Issues
234+
- **Table Of Contents (TOC) is missing in Word formatted report**
199235

200-
When opening the DOCX report, MS Word prompts the following
236+
When opening a Microsoft Word (DOCX) report for the first time, you will be prompted with the following warning;
201237

202238
`"This document contains fields that may refer to other files. Do you want to update the fields in this document?"`
203239

204240
`Yes / No`
205241

206-
Clicking `No` will prevent the TOC fields being updated and leaving the TOC empty.
242+
Clicking No will prevent the TOC fields from being updated, leaving the Table of Contents empty.
243+
244+
Always reply Yes to this message when prompted by Microsoft Word to ensure the Table of Contents is updated.
245+
246+
Save the document to prevent future prompts when opening the document.
247+
248+
- **Images are missing from reports generated using Linux or macOS**
207249

208-
Always reply `Yes` to this message when prompted by MS Word.
250+
Unfortunately due to [breaking changes](https://learn.microsoft.com/en-gb/dotnet/core/compatibility/core-libraries/6.0/system-drawing-common-windows-only) in .NET 6, images are no longer supported for reports generated using Linux or macOS.

Samples/AsBuiltReport.Sample.Style-1.ps1

Lines changed: 126 additions & 0 deletions
Large diffs are not rendered by default.

0 commit comments

Comments
 (0)