{"id":3122,"date":"2019-06-11T20:09:57","date_gmt":"2019-06-11T19:09:57","guid":{"rendered":"https:\/\/www.lieben.nu\/liebensraum\/?p=3122"},"modified":"2019-06-11T20:09:57","modified_gmt":"2019-06-11T19:09:57","slug":"simplify-logon-scripts-in-intune-without-schedules","status":"publish","type":"post","link":"https:\/\/lieben.nu\/liebensraum\/2019\/06\/simplify-logon-scripts-in-intune-without-schedules\/","title":{"rendered":"Simplify Logon scripts in Intune without Scheduled tasks"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\">Intune does not have a native solution for logon scripts.  The community has designed some interesting solutions to this problem using the Intune Management Extension, such as <a rel=\"noreferrer noopener\" aria-label=\"Nicola's Azure storage based method (opens in a new tab)\" href=\"https:\/\/tech.nicolonsky.ch\/intune-execute-powershell-script-on-each-user-logon\/\" target=\"_blank\">Nicola&#8217;s Azure storage based method<\/a>, <a rel=\"noreferrer noopener\" aria-label=\"Michael Mardahl's IME reset method (opens in a new tab)\" href=\"https:\/\/www.iphase.dk\/force-reload-intune-powershell-scripts\/\" target=\"_blank\">Michael Mardahl&#8217;s IME reset method<\/a> and my own<a rel=\"noreferrer noopener\" aria-label=\" hidden vbscript scheduled task method. (opens in a new tab)\" href=\"https:\/\/gitlab.com\/Lieben\/o4bautoconfigandredirect\/blob\/master\/O4BClientAutoConfig.ps1\" target=\"_blank\"> hidden vbscript scheduled task method.<\/a><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">The problem with all these solutions is that they rely on <em>scheduled tasks<\/em>. This is not the most reliable method as the user can easily influence it, and it <strong>usually does not support uninstalling or unassigning <\/strong>the script unless you write a specific script for that, assign it to the user, etc yada yada.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">So i wrote a script template that can run at logon, at set intervals or both and supports ANY script you write in Intune. <a rel=\"noreferrer noopener\" aria-label=\"invoke-asIntuneLogonScript on Git (opens in a new tab)\" href=\"https:\/\/gitlab.com\/Lieben\/assortedFunctions\/blob\/master\/invoke-asIntuneLogonScript.ps1\" target=\"_blank\">invoke-asIntuneLogonScript on Git<\/a><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Insert your code, upload to Intune as usual, and set the properties as follows and assign to your users:<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img loading=\"lazy\" decoding=\"async\" width=\"562\" height=\"163\" src=\"https:\/\/www.lieben.nu\/liebensraum\/wp-content\/uploads\/2019\/06\/2019-06-11-21_09_20-Script-Settings-Microsoft-Azure.png\" alt=\"\" class=\"wp-image-3123\" srcset=\"https:\/\/lieben.nu\/liebensraum\/wp-content\/uploads\/2019\/06\/2019-06-11-21_09_20-Script-Settings-Microsoft-Azure.png 562w, https:\/\/lieben.nu\/liebensraum\/wp-content\/uploads\/2019\/06\/2019-06-11-21_09_20-Script-Settings-Microsoft-Azure-300x87.png 300w\" sizes=\"auto, (max-width: 562px) 100vw, 562px\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>User rights<\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Note that, due to the nature of registry permissions, your users have to be local admin for this solution to work. A workaround has been posted by <a href=\"https:\/\/github.com\/jaytronic211\/intune\" target=\"_blank\" rel=\"noreferrer noopener\">Jaytronic<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Intune does not have a native solution for logon scripts. The community has designed some interesting solutions to this problem using the Intune Management Extension, such as Nicola&#8217;s Azure storage based method, Michael Mardahl&#8217;s IME reset method and my own hidden vbscript scheduled task method. The problem with all these solutions is that they rely &hellip; <a href=\"https:\/\/lieben.nu\/liebensraum\/2019\/06\/simplify-logon-scripts-in-intune-without-schedules\/\" class=\"more-link\">Continue reading <span class=\"screen-reader-text\">Simplify Logon scripts in Intune without Scheduled tasks<\/span> <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_crdt_document":"","footnotes":""},"categories":[1],"tags":[],"class_list":["post-3122","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"_links":{"self":[{"href":"https:\/\/lieben.nu\/liebensraum\/wp-json\/wp\/v2\/posts\/3122","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/lieben.nu\/liebensraum\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/lieben.nu\/liebensraum\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/lieben.nu\/liebensraum\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/lieben.nu\/liebensraum\/wp-json\/wp\/v2\/comments?post=3122"}],"version-history":[{"count":0,"href":"https:\/\/lieben.nu\/liebensraum\/wp-json\/wp\/v2\/posts\/3122\/revisions"}],"wp:attachment":[{"href":"https:\/\/lieben.nu\/liebensraum\/wp-json\/wp\/v2\/media?parent=3122"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/lieben.nu\/liebensraum\/wp-json\/wp\/v2\/categories?post=3122"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/lieben.nu\/liebensraum\/wp-json\/wp\/v2\/tags?post=3122"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}