You can also download AutoIT and run the follwoing script concurrently with your existing script and it will click the necessary controls to allow access to Outlook for 10 minutes every ten minutes until you cancel it or fail to answer it for a certain period of time:
$result = -1
$x = 0
While $result = -1
If WinActive("Microsoft Office Outlook") Then
WinActivate("Microsoft Office Outlook");
ControlClick("Microsoft Office Outlook", "", "[ID:4771]")
Sleep(500)
ControlCommand("Microsoft Office Outlook", "", "[ID:4773]", "SelectString", '10 Minutes')
Sleep(1000)
WinActivate("Microsoft Office Outlook")
Send("{TAB}")
Sleep(1000)
Send("{TAB}")
Sleep(1000)
Send("{ENTER}")
Sleep(500)
$result = MsgBox(36, "Success!", "Success", 10);
If $result = -1 Then
Sleep(570000)
EndIf
Else
If $x < 101 Then
Sleep(5000)
$x = $x + 1
Else
$result = MsgBox(36, "Awaiting Security Popup", "Continue waiting?", 10)
If $result = 6 Then
$result = -1
$x = 0
EndIf
EndIf
EndIf
WEnd