PS script fails to run on Windows 10 1903, works on Windows 10 1809
I have a basic PS script that works flawlessly on Win10 1809. However the same PS scrip fails after upgrading to Windows 10 1903 (fresh install). PS executionPolicy is already set to 'Bypass' by the way. Does anyone if PS changed on 1903 that's causing this script to fail with error "Powershell script returned error code 1" on PDQ?
PS Script:
Latitude7400 = "\\dlsithd\c\Repository\Dell\BIOS\7400_2-in-1\Latitude_7400_2-in-1_1_2_2.exe /s /r/ f"
LatitudeE6440 = "\\dlsithd\c\Repository\Dell\BIOS\E6440\E6440A23.exe /s /r /f" $model=((Get-WmiObject -Class win32_computersystem).model)if ($model -eq ("Latitude 7400 2-in-1"))
{$bios=(get-wmiobject -Class win32_bios).SMBIOSBIOSVersion; if ($bios -notlike "1.2.2") { $Bitlocker = (Get-BitLockerVolume).ProtectionStatus if ($Bitlocker -eq "ON") { Suspend-BitLocker -MountPoint "C:"; cmd.exe /c $Latitude7400 } cmd.exe /c "$Latitude7400" } } if ($model -eq ("Latitude E6440")) {$bios=(get-wmiobject -Class win32_bios).SMBIOSBIOSVersion; if ($bios -notlike "A23") {$Bitlocker = (Get-BitLockerVolume).ProtectionStatus if ($Bitlocker -eq "ON") { Suspend-BitLocker -MountPoint "C:"; cmd.exe /c $LatitudeE6440 } cmd.exe /c $LatitudeE6440 } }
0
Comments
I modified the variable by adding apostrophes
Latitude7400 = '"\dlsithd\c\Repository\Dell\BIOS\7400_2-in-1\Latitude_7400_2-in-1_1_2_2.exe" /s /r/ f'
LatitudeE6440 = '"\dlsithd\c\Repository\Dell\BIOS\E6440\E6440A23.exe" /s /r /f'
Now I get error code -1073741819
Any suggestion?
Do you get an error when you run this script manually on the 1903 computer (not from Deploy)?
I found this is a bug on a fresh install of Windows 10 1903. After applying all available MS patches, it worked flawlessly.
Please sign in to leave a comment.