This change addresses the initial phase of #25 in that it converts the New-AsBuiltReport.ps1 into an advanced function and refactors the project into a module. I have also updated the New-AsBuiltReport.ps1 help contents and the main project README.md to reflect this change.
Related Issue
25
Motivation and Context
This change has been discussed with the team and is generally accepted as the correct way forward. It allows us to provide the standardised PowerShell command style that users are used to using. It also allows us to start investigating hosting the project on the PSGallery for easier installation.
How Has This Been Tested?
Functionality
I have tested this re factored module against my test environments and no issues were found when generating multiple reports.
PSGallery Compatability
I have tested this module's ability to be hosted on PSGallery by creating a local PSGallery repository, publishing this module to my local repo and then installing it from my local repo. The steps I used are as follows.
NOTE - you must have installed PScribo from the official PSGallery repository to be able to follow these steps.
We can now see both PScribo and As-Built-Report modules listed in our LocalPSRepo when we run Find-Module -Repository LocalPSRepo
Finally we can install the As-Built-Report module from our LocalPSRepo. Close your current PowerShell session and start a new one. Now run the following command.
Install-Module As-Built-Report -Scope CurrentUser
You can now import the As-Built-Report module like any other module.
Import-Module As-Built-Report
Get-Command -Module As-Built-Report
Types of changes
[ ] Bug fix (non-breaking change which fixes an issue)
[] New feature (non-breaking change which adds functionality)
[x] Breaking change (fix or feature that would cause existing functionality to change)
Checklist:
[x] My code follows the code style of this project.
[x] My change requires a change to the documentation.
Description
This change addresses the initial phase of #25 in that it converts the
New-AsBuiltReport.ps1
into an advanced function and refactors the project into a module. I have also updated theNew-AsBuiltReport.ps1
help contents and the main projectREADME.md
to reflect this change.Related Issue
25
Motivation and Context
This change has been discussed with the team and is generally accepted as the correct way forward. It allows us to provide the standardised PowerShell command style that users are used to using. It also allows us to start investigating hosting the project on the PSGallery for easier installation.
How Has This Been Tested?
Functionality
I have tested this re factored module against my test environments and no issues were found when generating multiple reports.
PSGallery Compatability
I have tested this module's ability to be hosted on PSGallery by creating a local PSGallery repository, publishing this module to my local repo and then installing it from my local repo. The steps I used are as follows.
NOTE - you must have installed PScribo from the official PSGallery repository to be able to follow these steps.
mkdir C:\LocalPSRepo
Register-PSRepository -Name LocalPSRepo -SourceLocation C:\LocalPSRepo -PublishLocation C:\LocalPSRepo -InstallationPolicy Trusted
$env:PSModulePath
C:\Users\Ryan\Stuff\As-Built-Report
you would run the following command.$env:PSModulePath += ";C:\Users\Ryan\Stuff\"
Publish-Module -Name PScribo -Repository LocalPSRepo -Verbose
Publish-Module -Name As-Built-Report -Repository LocalPSRepo -Verbose
PScribo
andAs-Built-Report
modules listed in ourLocalPSRepo
when we runFind-Module -Repository LocalPSRepo
As-Built-Report
module from ourLocalPSRepo
. Close your current PowerShell session and start a new one. Now run the following command.Install-Module As-Built-Report -Scope CurrentUser
As-Built-Report
module like any other module.Import-Module As-Built-Report
Get-Command -Module As-Built-Report
Types of changes
Checklist: