Describe the bug
If multiple versions of the same report module (eg. AsBuiltReport.VMware.vSphere) are installed, an error may appear when running either of these commands,
New-AsBuiltReport
New-AsBuiltConfig
New-AsBuiltReportConfig
Error Message
Copy-Item : Cannot find path 'C:\Program Files\WindowsPowerShell\Modules\AsBuiltReport.VMware.vSphere\1.0.6 C:\Program
Files\WindowsPowerShell\Modules\AsBuiltReport.VMware.vSphere\1.0.0\AsBuiltReport.VMware.vSphere AsBuiltReport.VMware.vSphere.json' because it does not exist.
At C:\Program Files\WindowsPowerShell\Modules\AsBuiltReport.Core\1.0.0\Src\Public\New-AsBuiltReportConfig.ps1:78 char:17
+ ... Copy-Item -Path "$($Module.ModuleBase)\$($Module.Name).js ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : ObjectNotFound: (C:\Program File...re.vSphere.json:String) [Copy-Item], ItemNotFoundException
+ FullyQualifiedErrorId : PathNotFound,Microsoft.PowerShell.Commands.CopyItemCommand
Workaround 1
Uninstall older versions of the report modules
Uninstall-module -Name AsBuiltReport.<Report.Module> -RequiredVersion <version to uninstall>
Workaround 2
Run New-AsBuiltReport and specify existing configuration files
Specify AsBuiltReport config using -AsBuiltConfigPath parameter
Specify Report config using -ReportConfigPath parameter
Describe the bug If multiple versions of the same report module (eg. AsBuiltReport.VMware.vSphere) are installed, an error may appear when running either of these commands,
New-AsBuiltReport
New-AsBuiltConfig
New-AsBuiltReportConfig
Error Message
Workaround 1
Uninstall-module -Name AsBuiltReport.<Report.Module> -RequiredVersion <version to uninstall>
Workaround 2 Run
New-AsBuiltReport
and specify existing configuration files-AsBuiltConfigPath
parameter-ReportConfigPath
parameter