You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
PS C:\Windows\system32> [environment]::OSVersion.Version
Major Minor Build Revision
----- ----- ----- --------
10 0 19043 0
PS C:\Windows\system32> Get-Module -Name LabBuilder
ModuleType Version Name ExportedCommands
---------- ------- ---- ----------------
Script 1.2.0 LabBuilder {Connect-LabVM, Disconnect-LabVM, Get-Lab, Get-LabResourceISO...}
On installing the above version of LabBuilder and trying to Install-Lab, a ParameterBindingValidationException exception is thrown:
PS C:\Windows\system32> Install-Lab -ConfigPath D:\VMs\Labs\MIM1\Configuration.xml -Verbose
VERBOSE: Repository details, Name = 'PSGallery', Location = 'https://www.powershellgallery.com/api/v2'; IsTrusted = 'True'; IsRegistered = 'True'.
Write-LabMessage : Cannot validate argument on parameter 'Message'. The argument is null or empty. Provide an argument that is not null or empty, and then try the command again.
At C:\Program Files\WindowsPowerShell\Modules\LabBuilder\1.2.0\LabBuilder.psm1:9729 char:35
+ ... te-LabMessage -Message $($LocalizedData.InitializingLabFoldersMesage)
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : InvalidData: (:) [Write-LabMessage], ParameterBindingValidationException
+ FullyQualifiedErrorId : ParameterArgumentValidationError,Write-LabMessage
<lines omitted for brevity - all related to the above>
Inspecting LabBuilder.psm1, it appears $LocalizedData is not set. It should be set under lines 11-31:
This should set $culture to en-US if $PSUICulture is empty, or if a path does not exist for the local culture data. This fails however as the Test-Path if statement will only set it to en-US if the path exists. I believe the result of Test-Path should be negated.
My own culture is:
PS C:\Windows\system32> $PSUICulture
en-GB
The text was updated successfully, but these errors were encountered:
stuart938503
pushed a commit
to stuart938503/LabBuilder
that referenced
this issue
Nov 1, 2021
Prelims:
On installing the above version of LabBuilder and trying to
Install-Lab
, aParameterBindingValidationException
exception is thrown:Inspecting
LabBuilder.psm1
, it appears$LocalizedData
is not set. It should be set under lines 11-31:This should set $culture to
en-US
if$PSUICulture
is empty, or if a path does not exist for the local culture data. This fails however as theTest-Path
if statement will only set it toen-US
if the path exists. I believe the result ofTest-Path
should be negated.My own culture is:
The text was updated successfully, but these errors were encountered: