Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ## Insert under installation phase in PSADT script
- ## Show installation progress
- Show-InstallationProgress -StatusMessage 'BIOS is being updated. Do not turn off your PC.'
- ## Get model of the PC, split the last string, which is the model.
- $Model = ((Get-WmiObject -Class Win32_ComputerSystemProduct).Version).Split()[-1]
- ## Set variable for folder to which files will be copied to.
- $BIOStemp = "$envSystemDrive\Temp"
- ## Copy files for the correct model.
- Copy-File -Path "$dirFiles\$Model" -Destination $BIOStemp -Recurse
- ## Perform BIOS update, depending on if ThinkCentre or ThinkPad (default). For ThinkPads, ignore exit code 1 (success).
- Switch -Wildcard ($Model) {
- "*M9*" {Execute-Process "$BIOStemp\$Model\flash64.cmd" -Parameters "/quiet /sccm"}
- default {Execute-Process "$BIOStemp\$Model\winuptp64.exe" -Parameters "-s" -IgnoreExitCodes '1'}
- }
Add Comment
Please, Sign In to add comment