{"id":5027,"date":"2024-02-15T12:53:06","date_gmt":"2024-02-15T20:53:06","guid":{"rendered":"https:\/\/SUMMALAI.COM\/?p=5027"},"modified":"2024-02-15T12:54:20","modified_gmt":"2024-02-15T20:54:20","slug":"how-to-delay-an-application-to-be-installed-after-enrolling-in-autopilot","status":"publish","type":"post","link":"https:\/\/SUMMALAI.COM\/?p=5027","title":{"rendered":"How to Delay an Applicaiton to be Installed AFTER Autopilot Enrollment."},"content":{"rendered":"\n<p>To make sure the app isn\u2019t installed during&nbsp;<strong>Autopilot,<\/strong>&nbsp;we have got some options at our disposal.<\/p>\n\n\n\n<p>1. You could configure the app as available so end-users could install the app on their own.<\/p>\n\n\n\n<p>2. We could change the App availability to make sure the app is downloaded on a specific date but that\u2019s not what I want.<\/p>\n\n\n\n<p>3. You could configure a Win32app requirement rule to determine if the process:\u00a0<strong>Microsoft Account Sign-in page (<strong>WWAHOST.exe)<\/strong><\/strong>\u00a0is running<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/call4cloud.nl\/wp-content\/uploads\/2022\/08\/image-23.png\" alt=\"\" class=\"wp-image-11079\"\/><\/figure>\n\n\n\n<p>You could do so by using this PowerShell Script as a Requirement rule. When WWAHost is still running it will output False. If WWAHost isn\u2019t running anymore, the output will be True<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code><em>$ProcessActive = Get-Process \"WWAHost\" -ErrorAction silentlycontinue\n$CheckNull = $ProcessActive -eq $null\n$CheckNull<\/em>\n\nSave above 3 lines as a PowerShell ps1 file. \n\nAnd then add it to the \"requirements\" tab.<\/code><\/pre>\n\n\n\n<figure class=\"wp-block-image size-full\"><img fetchpriority=\"high\" decoding=\"async\" width=\"774\" height=\"583\" src=\"https:\/\/SUMMALAI.COM\/wp-content\/uploads\/2024\/02\/ps1.jpg\" alt=\"\" class=\"wp-image-5028\" srcset=\"https:\/\/SUMMALAI.COM\/wp-content\/uploads\/2024\/02\/ps1.jpg 774w, https:\/\/SUMMALAI.COM\/wp-content\/uploads\/2024\/02\/ps1-300x226.jpg 300w, https:\/\/SUMMALAI.COM\/wp-content\/uploads\/2024\/02\/ps1-768x578.jpg 768w\" sizes=\"(max-width: 774px) 100vw, 774px\" \/><\/figure>\n\n\n\n<p>If you want to ensure that each time the device gets enrolled, the app is installed\u00a0<strong>AFTER<\/strong>\u00a0the device is working for a\u00a0<strong>minimum of 1 hour.<\/strong><\/p>\n\n\n\n<p>Why not just use the creation time of the&nbsp;<strong>IntuneManagementExtension<\/strong>&nbsp;folder?<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/call4cloud.nl\/wp-content\/uploads\/2022\/06\/graphical-user-interface-text-application-email-8.png\" alt=\"Graphical user interface, text, application, email\n\nDescription automatically generated\" class=\"wp-image-9970\"\/><\/figure>\n\n\n\n<p>This folder will only be created when a device is enrolling into&nbsp;<strong>Intune<\/strong>&nbsp;(when you have WIn32apps\/PowerShell scripts in place) We are also blocking the enrolment of personal devices to be&nbsp;<strong>100% sure ONLY autopilot devices\/corporate devices can be used<\/strong>.&nbsp;<img decoding=\"async\" width=\"1481\" height=\"395\" src=\"https:\/\/call4cloud.nl\/wp-content\/uploads\/2022\/06\/graphical-user-interface-description-automaticall.png\" alt=\"Graphical user interface\n\nDescription automatically generated\" srcset=\"https:\/\/call4cloud.nl\/wp-content\/uploads\/2022\/06\/graphical-user-interface-description-automaticall.png 1481w, https:\/\/call4cloud.nl\/wp-content\/uploads\/2022\/06\/graphical-user-interface-description-automaticall-300x80.png 300w, https:\/\/call4cloud.nl\/wp-content\/uploads\/2022\/06\/graphical-user-interface-description-automaticall-1024x273.png 1024w, https:\/\/call4cloud.nl\/wp-content\/uploads\/2022\/06\/graphical-user-interface-description-automaticall-768x205.png 768w\"><\/p>\n\n\n\n<p>This script below is just as I want it to be, simple!<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>$AppInstallDelay = New-TimeSpan -Days 0 -Hours 1 -Minutes 0\n\n$ime = Get-Item \"C:\\Program Files (x86)\\Microsoft Intune Management Extension\"  | select Name,CreationTime \n$EnrolmentDate = $ime.creationtime\n\n$futuredate = $EnrolmentDate + $AppInstallDelay\n\n\n#checking date and futuredate\n$outcome = ((Get-Date) -ge ($futuredate))  \n$outcome\n<\/code><\/pre>\n\n\n\n<p>When adding a new App in Intune you could also add a Script as a&nbsp;<strong>requirement rule.<\/strong><\/p>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/call4cloud.nl\/wp-content\/uploads\/2022\/06\/graphical-user-interface-text-application-email-9.png\" alt=\"Graphical user interface, text, application, email\n\nDescription automatically generated\" class=\"wp-image-9973\"\/><\/figure>\n\n\n\n<p>After clicking on \u201cadd\u201d you will be asked to select the script file and the output data type. As shown below I selected the \u201c<strong>Boolean\u201d<\/strong>&nbsp;data type and made sure the&nbsp;<strong>\u201cOperator\u201d<\/strong>&nbsp;was configured to \u201c<strong>Equals<\/strong>\u201d and the corresponding \u201c<strong>Value<\/strong>\u201d to&nbsp;<strong>\u201cTrue\/yes\u201d<\/strong><\/p>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/call4cloud.nl\/wp-content\/uploads\/2022\/06\/graphical-user-interface-text-application-descr-8.png\" alt=\"Graphical user interface, text, application\n\nDescription automatically generated\" class=\"wp-image-9974\"\/><\/figure>\n\n\n\n<p>After finishing the app creation, I wiped my test device and I made sure the enrollment date was correct<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/call4cloud.nl\/wp-content\/uploads\/2022\/06\/graphical-user-interface-text-application-descr-9.png\" alt=\"Graphical user interface, text, application\n\nDescription automatically generated\" class=\"wp-image-9975\"\/><\/figure>\n\n\n\n<p>As shown above, the device was enrolled into Intune around 11:23 and the PowerShell script result is&nbsp;<strong>False<\/strong><\/p>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/call4cloud.nl\/wp-content\/uploads\/2022\/06\/text-letter-description-automatically-generated-1.png\" alt=\"Text, letter\n\nDescription automatically generated\" class=\"wp-image-9976\"\/><\/figure>\n\n\n\n<p>I guess we now need to wait an hour until&nbsp;<strong>the requirement rule is met<\/strong>&nbsp;because Intune is also mentioning the App as not applicable.<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/call4cloud.nl\/wp-content\/uploads\/2022\/06\/word-image-9962-15.png\" alt=\"\" class=\"wp-image-9977\"\/><\/figure>\n\n\n\n<p>After waiting some time and rebooting the device to trigger the detection, the requirement rule was met and the app finally started installing!<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/call4cloud.nl\/wp-content\/uploads\/2022\/06\/image-83.png\" alt=\"\" class=\"wp-image-10039\"\/><\/figure>\n\n\n\n<p><\/p>\n\n\n\n<p>Ref: <a href=\"https:\/\/call4cloud.nl\/2022\/08\/autopilot-is-mine-all-others-pay-time\/\">Configure Apps to be installed AFTER enrolling in Autopilot (call4cloud.nl)<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>To make sure the app isn\u2019t installed during&nbsp;Autopilot,&nbsp;we have got some options at our disposal. 1. You could configure the app as available so end-users could install the app on their own. 2. We could change the App availability to make sure the app is downloaded on a specific date but that\u2019s not what I <a class=\"read-more\" href=\"https:\/\/SUMMALAI.COM\/?p=5027\">Read More<\/a><\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_bbp_topic_count":0,"_bbp_reply_count":0,"_bbp_total_topic_count":0,"_bbp_total_reply_count":0,"_bbp_voice_count":0,"_bbp_anonymous_reply_count":0,"_bbp_topic_count_hidden":0,"_bbp_reply_count_hidden":0,"_bbp_forum_subforum_count":0,"om_disable_all_campaigns":false,"_monsterinsights_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0,"footnotes":""},"categories":[1185,1249,10],"tags":[1759,1760],"class_list":["post-5027","post","type-post","status-publish","format-standard","hentry","category-autopilot-intune","category-azure-microsoft","category-microsoft","tag-delay-an-application-to-be-installed-intune","tag-deploy-apps-after-autopilot-enrollment"],"aioseo_notices":[],"_links":{"self":[{"href":"https:\/\/SUMMALAI.COM\/index.php?rest_route=\/wp\/v2\/posts\/5027","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/SUMMALAI.COM\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/SUMMALAI.COM\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/SUMMALAI.COM\/index.php?rest_route=\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/SUMMALAI.COM\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=5027"}],"version-history":[{"count":2,"href":"https:\/\/SUMMALAI.COM\/index.php?rest_route=\/wp\/v2\/posts\/5027\/revisions"}],"predecessor-version":[{"id":5030,"href":"https:\/\/SUMMALAI.COM\/index.php?rest_route=\/wp\/v2\/posts\/5027\/revisions\/5030"}],"wp:attachment":[{"href":"https:\/\/SUMMALAI.COM\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=5027"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/SUMMALAI.COM\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=5027"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/SUMMALAI.COM\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=5027"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}