Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion AsBuiltReport.Core/AsBuiltReport.Core.psd1
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@

# Version number of this module.

ModuleVersion = '1.5.0'
ModuleVersion = '1.5.1'

# Supported PSEditions
CompatiblePSEditions = @('Desktop', 'Core')
Expand Down
4 changes: 2 additions & 2 deletions AsBuiltReport.Core/Src/Public/New-AsBuiltReport.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -266,12 +266,12 @@ function New-AsBuiltReport {
[String] $Orientation = 'Portrait',

[Parameter(
Mandatory = $true,
Mandatory = $false,
HelpMessage = 'Please provide the path to the document output file'
)]
[ValidateNotNullOrEmpty()]
[Alias('OutputPath')]
[String] $OutputFolderPath,
[String] $OutputFolderPath = (Get-Location).Path,

[Parameter(
Mandatory = $false,
Expand Down
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,11 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [1.5.1] - 2025-11-17

### Changed
- `OutputFolderPath` parameter is now optional. If not specified, the report will be saved to the current folder location. Resolves [#65](https://github.com/AsBuiltReport/AsBuiltReport.Core/issues/65).

## [1.5.0] - 2025-10-21

### Added
Expand Down
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@ If you are unable to use the PowerShell Gallery, you can still install the `AsBu

1. Download the [latest release](https://github.com/AsBuiltReport/AsBuiltReport.Core/releases/latest) zip from GitHub
2. Extract the zip file
3. Copy the folder `AsBuiltReport.Core` to a path that is set in `$env:PSModulePath`.
3. Copy the sub-folder `AsBuiltReport.Core` to a path that is set in `$env:PSModulePath`.
4. For Windows users only, open a PowerShell terminal window and unblock the downloaded files with
```powershell
$path = (Get-Module -Name AsBuiltReport.Core -ListAvailable).ModuleBase; Unblock-File -Path $path\*.psd1; Unblock-File -Path $path\Src\Public\*.ps1
Expand Down Expand Up @@ -262,8 +262,8 @@ Get-Help New-AsBuiltReportConfig -Full
Here are some examples to get you going.

```powershell
# Generate a VMware vSphere AsBuiltReport 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.
New-AsBuiltReport -Report 'VMware.vSphere' -Target '192.168.1.100' -Username 'admin' -Password 'admin' -Format HTML,Word -EnableHealthCheck -OutputFolderPath 'H:\Documents\'
# Generate a VMware vSphere AsBuiltReport in HTML & Word formats. Perform a health check to highlight particular issues which exist within the VMware vSphere environment. Save the report to the current folder.
New-AsBuiltReport -Report 'VMware.vSphere' -Target '192.168.1.100' -Username 'admin' -Password 'admin' -Format HTML,Word -EnableHealthCheck

# Generate a Nutanix Prism Element AsBuiltReport 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.
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
Expand Down Expand Up @@ -296,4 +296,4 @@ New-AsBuiltReport -Report Veeam.VBR -Target veeam01.corp.local -Username admin -

- **Images are missing from reports generated using Linux or macOS**

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.
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.
9 changes: 4 additions & 5 deletions Tests/Unit/New-AsBuiltReport.Tests.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,6 @@ Describe 'New-AsBuiltReport Unit Tests' {
($TargetParam.Attributes | Where-Object { $_ -is [System.Management.Automation.ParameterAttribute] }).Mandatory | Should -Contain $true
}

It 'Should have OutputFolderPath parameter as mandatory' {
$OutputParam = $Command.Parameters['OutputFolderPath']
($OutputParam.Attributes | Where-Object { $_ -is [System.Management.Automation.ParameterAttribute] }).Mandatory | Should -Contain $true
}

It 'Should have Credential parameter in Credential parameter set' {
$CredentialParam = $Command.Parameters['Credential']
$CredentialParam | Should -Not -BeNullOrEmpty
Expand Down Expand Up @@ -80,6 +75,10 @@ Describe 'New-AsBuiltReport Unit Tests' {
$TargetParam.ParameterType.Name | Should -Be 'String[]'
}

It 'Should have OutputFolderPath parameter' {
$Command.Parameters.Keys | Should -Contain 'OutputFolderPath'
}

It 'Should have Timestamp parameter' {
$Command.Parameters.Keys | Should -Contain 'Timestamp'
}
Expand Down
Loading