{"action":"created","issue":{"url":"https://api.github.com/repos/mwrock/boxstarter/issues/215","repository_url":"https://api.github.com/repos/mwrock/boxstarter","labels_url":"https://api.github.com/repos/mwrock/boxstarter/issues/215/labels{/name}","comments_url":"https://api.github.com/repos/mwrock/boxstarter/issues/215/comments","events_url":"https://api.github.com/repos/mwrock/boxstarter/issues/215/events","html_url":"https://github.com/mwrock/boxstarter/issues/215","id":187541380,"number":215,"title":"Invoke-Reboot and Server Core","user":{"login":"LukeCarrier","id":597015,"avatar_url":"https://avatars0.githubusercontent.com/u/597015?v=4","gravatar_id":"","url":"https://api.github.com/users/LukeCarrier","html_url":"https://github.com/LukeCarrier","followers_url":"https://api.github.com/users/LukeCarrier/followers","following_url":"https://api.github.com/users/LukeCarrier/following{/other_user}","gists_url":"https://api.github.com/users/LukeCarrier/gists{/gist_id}","starred_url":"https://api.github.com/users/LukeCarrier/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/LukeCarrier/subscriptions","organizations_url":"https://api.github.com/users/LukeCarrier/orgs","repos_url":"https://api.github.com/users/LukeCarrier/repos","events_url":"https://api.github.com/users/LukeCarrier/events{/privacy}","received_events_url":"https://api.github.com/users/LukeCarrier/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":7,"created_at":"2016-11-06T04:29:44Z","updated_at":"2018-02-02T02:00:52Z","closed_at":null,"author_association":"NONE","body":"First of all, thanks for the work you're doing with this module -- it's an absolute lifesaver.\r\n\r\nI've [recently been attempting to package Server Core](https://github.com/LukeCarrier/vagrant-windows/tree/editions) and appear to have hit a roadblock with the `Invoke-Reboot` cmdlet. It seems that Core editions don't execute items in the Startup folder, so `boxstarter-post-restart.bat` never runs.\r\n\r\nI've managed to work around this by setting `PowerShell.exe -NoExit` as the `Winlogon\\Shell` value and adding the following to my `$PROFILE` prior to invoking a reboot:\r\n\r\n```powershell\r\ntry {\r\n    $startup = \"$($env:APPDATA)\\Microsoft\\Windows\\Start Menu\\Programs\\Startup\\boxstarter-post-restart.bat\"\r\n    if (!$env:PACKER_STARTUP_WORKAROUND -and (Test-Path $startup)) {\r\n        & cmd /c $startup\r\n    }\r\n} finally {\r\n    $env:PACKER_STARTUP_WORKAROUND = 1\r\n}\r\n```\r\n\r\nI realise this is _really_ ugly. Any ideas how to do it \"properly\"?"},"comment":{"url":"https://api.github.com/repos/mwrock/boxstarter/issues/comments/362462577","html_url":"https://github.com/mwrock/boxstarter/issues/215#issuecomment-362462577","issue_url":"https://api.github.com/repos/mwrock/boxstarter/issues/215","id":362462577,"user":{"login":"mwrock","id":655165,"avatar_url":"https://avatars2.githubusercontent.com/u/655165?v=4","gravatar_id":"","url":"https://api.github.com/users/mwrock","html_url":"https://github.com/mwrock","followers_url":"https://api.github.com/users/mwrock/followers","following_url":"https://api.github.com/users/mwrock/following{/other_user}","gists_url":"https://api.github.com/users/mwrock/gists{/gist_id}","starred_url":"https://api.github.com/users/mwrock/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mwrock/subscriptions","organizations_url":"https://api.github.com/users/mwrock/orgs","repos_url":"https://api.github.com/users/mwrock/repos","events_url":"https://api.github.com/users/mwrock/events{/privacy}","received_events_url":"https://api.github.com/users/mwrock/received_events","type":"User","site_admin":false},"created_at":"2018-02-02T02:00:52Z","updated_at":"2018-02-02T02:00:52Z","author_association":"OWNER","body":"In theory I think it could pick it up in the task non-interactively. The question is how would a user ever know boxstarter is done and also not lose visibility into the success failure without polling the log file? The approach would have to consider that bit of UX."}}
{"actor":{"display_login":"mwrock"}}