none
Bios update during MDT TS

    Question

  • I have a ps1 in a MDT task sequence during the "state restore" that update the bios of the machine...

    It is working great but I would like to let the user choice if he wants to update or not...

    I have place in the begining of my ps1 this code (in the Windows environnement it is working ok..I have the question portion and the bios update portion if I select YES) but when I ran the deployment task I don't see the question portion. The bios update portion is directly executed.

    Is there a way to correct the situation

        $caption = "Confirm"    
        $message = "Would you like to update the bios:"
        [int]$defaultChoice = 0
        $yes = New-Object System.Management.Automation.Host.ChoiceDescription "&Yes", "Execution"
        $no = New-Object System.Management.Automation.Host.ChoiceDescription "&No", "Quit"
        $options = [System.Management.Automation.Host.ChoiceDescription[]]($yes, $no)
        $choiceRTN = $host.ui.PromptForChoice($caption,$message, $options,$defaultChoice)
    
    if ( $choiceRTN -ne 1 )
    {
       "Execution"
    ----code for the bios update portion----
    else
    {
       "Quit"
    }
    I've place the Bios update script just before the "Install Applications" task....would it be better to place elsewhere?

    Sunday, September 09, 2018 3:37 PM