FriendsOfMDT / PSD

PowerShell Deployment
MIT License
471 stars 72 forks source link

BUG: Error in PSDWizardNew.psm1 Language Selection #123

Open Tenster opened 5 months ago

Tenster commented 5 months ago

I observed that when attempting to select the language in the Locale tab, the Next button becomes greyed out.

Subsequently, I have to backtrack and simply skip the language selection to set it. While investigating in PowerShell, I encountered an error that directed me to the PSDWizardNew.psm1 file:

$Global:OSSupportedLanguages = @(($Global:OperatingSystemList | Where-Object Guid -eq $TSAssignedOSGUID).Language)
        #Get only available locales settings from Select OS
        $Global:LanguageList = $Global:PSDWizardLocales | Where-Object-Object {$_.Culture -in $Global:OSSupportedLanguages} | Select-Object -Unique

Upon closer inspection, it appears that there is an extra "-Object" in the Where-Object cmdlet, leading to this error.

Tenster commented 5 months ago

I edited the PSDWizardNew. The Error is not there anymore, but the Button still gets greyed out

GeoSimos commented 5 months ago

I observed that when attempting to select the language in the Locale tab, the Next button becomes greyed out.

Subsequently, I have to backtrack and simply skip the language selection to set it. While investigating in PowerShell, I encountered an error that directed me to the PSDWizardNew.psm1 file:

$Global:OSSupportedLanguages = @(($Global:OperatingSystemList | Where-Object Guid -eq $TSAssignedOSGUID).Language)
        #Get only available locales settings from Select OS
        $Global:LanguageList = $Global:PSDWizardLocales | Where-Object-Object {$_.Culture -in $Global:OSSupportedLanguages} | Select-Object -Unique

Upon closer inspection, it appears that there is an extra "-Object" in the Where-Object cmdlet, leading to this error.

Nice catch! This issue is for @PowerShellCrack to take care of and assist you further.

PowerShellCrack commented 5 months ago

I am looking into this. thanks for catching it.