Command Prompt Shutdown Yes / No Question via Task Scheduler

The following command should run the .bat file.

    @ECHO Off
    SET /P yesno=It will be closed in 30 minutes.Do you want to Shutdown this machine? [Y/N]:
    IF "%yesno%"=="y" GOTO Confirmation
    IF "%yesno%"=="Y" GOTO Confirmation
    IF "%yesno%"=="A" | "a" GOTO End
    IF "%yesno%"=="n" GOTO End
    IF "%yesno%"=="N" GOTO End
    
    :Confirmation
    
    ECHO System is going to Reboot now
    
    shutdown.exe -s -t 1800 
    
    GOTO EOF
    :End
    
    ECHO System Reboot cancelled
    
    TIMEOUT 5 >nul
    
    :EOF
    exit

Task schedule > Create Basic Task