{"action":"reopened","issue":{"url":"https://api.github.com/repos/PSAppDeployToolkit/PSAppDeployToolkit/issues/359","repository_url":"https://api.github.com/repos/PSAppDeployToolkit/PSAppDeployToolkit","labels_url":"https://api.github.com/repos/PSAppDeployToolkit/PSAppDeployToolkit/issues/359/labels{/name}","comments_url":"https://api.github.com/repos/PSAppDeployToolkit/PSAppDeployToolkit/issues/359/comments","events_url":"https://api.github.com/repos/PSAppDeployToolkit/PSAppDeployToolkit/issues/359/events","html_url":"https://github.com/PSAppDeployToolkit/PSAppDeployToolkit/issues/359","id":328275784,"node_id":"MDU6SXNzdWUzMjgyNzU3ODQ=","number":359,"title":"Show-InstallationRestartPrompt does not reboot if -DeployMode \"NonInteractive\"","user":{"login":"That-Annoying-Guy","id":12900014,"node_id":"MDQ6VXNlcjEyOTAwMDE0","avatar_url":"https://avatars1.githubusercontent.com/u/12900014?v=4","gravatar_id":"","url":"https://api.github.com/users/That-Annoying-Guy","html_url":"https://github.com/That-Annoying-Guy","followers_url":"https://api.github.com/users/That-Annoying-Guy/followers","following_url":"https://api.github.com/users/That-Annoying-Guy/following{/other_user}","gists_url":"https://api.github.com/users/That-Annoying-Guy/gists{/gist_id}","starred_url":"https://api.github.com/users/That-Annoying-Guy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/That-Annoying-Guy/subscriptions","organizations_url":"https://api.github.com/users/That-Annoying-Guy/orgs","repos_url":"https://api.github.com/users/That-Annoying-Guy/repos","events_url":"https://api.github.com/users/That-Annoying-Guy/events{/privacy}","received_events_url":"https://api.github.com/users/That-Annoying-Guy/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":3,"created_at":"2018-05-31T19:57:56Z","updated_at":"2018-11-06T20:47:59Z","closed_at":null,"author_association":"NONE","body":"If you build a Deploy-Application.ps1 with the -DeployMode \"Interactive\" parameter, the Show-InstallationRestartPrompt function works as advertised.\r\n\r\nIf you then use -DeployMode \"**NON**Interactive\", the Show-InstallationRestartPrompt function  just logs\r\n\"Bypass Installation Restart Prompt [Mode: NonInteractive].\" and exits the function.\r\n**It does not reboot silently.**\r\n\r\nI can modify the Show-InstallationRestartPrompt function behaviour for my fork with the code below but I thought this was inconsistent and that I should report it. It's either this or a new function to cause reboot while \"NonInteractive\".\r\n\r\n```\r\n\t\t## Bypass if in non-interactive mode\r\n\t\tIf ($deployModeSilent) {\r\n\t\t\tWrite-Log -Message \"Bypass Installation Restart Prompt [Mode: $deployMode].\" -Source ${CmdletName}\r\n\t\t\tWrite-Log -Message 'Force restart the computer in [$CountdownSeconds] seconds...' -Source ${CmdletName}\r\n\t\t\tRestart-Computer -Force -wait -Timeout $CountdownSeconds -AsJob # using AsJob to let script shutdown gracefully\r\n\t\t\tReturn\r\n\t\t}\r\n```"}}
{"actor":{"display_login":"sintaxasn"}}