{"id":4773,"date":"2023-05-23T09:43:45","date_gmt":"2023-05-23T16:43:45","guid":{"rendered":"https:\/\/SUMMALAI.COM\/?p=4773"},"modified":"2023-05-23T09:43:47","modified_gmt":"2023-05-23T16:43:47","slug":"how-to-deploy-internet-shortcut-with-custom-icon-on-intune","status":"publish","type":"post","link":"https:\/\/SUMMALAI.COM\/?p=4773","title":{"rendered":"How to Deploy Internet Shortcut with Custom Icon on Intune"},"content":{"rendered":"\n<p><a href=\"https:\/\/www.nielskok.tech\/author\/admin\/\"><\/a><\/p>\n\n\n\n<h4 class=\"wp-block-heading\">By Niels Kok<\/h4>\n\n\n\n<p>\u00a0<\/p>\n\n\n\n<p>When we as IT People deploy Windows 10 AutoPilot we often get the feedback from users that they miss their shortcuts for SharePoint and such. For that reason I have created a manual which you can use to deploy this using a Win32App.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Preparation<\/h2>\n\n\n\n<p>Create a folder where you store the files that you need to deploy. For example:<br><br>I am deploying a shortcut for my SharePoint Online environment. To deploy this shortcut I need to following files:<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/www.nielskok.tech\/wp-content\/uploads\/2020\/02\/image-8.png\" alt=\"\" class=\"wp-image-413\"\/><\/figure>\n\n\n\n<p>The install.cmd cointains the following code:<\/p>\n\n\n\n<p><strong>if<\/strong> not exist &#8220;C:\\ProgramData\\AutoPilotConfig&#8221; md &#8220;C:\\ProgramData\\AutoPilotConfig&#8221;<\/p>\n\n\n\n<p><strong>if<\/strong> not exist &#8220;C:\\ProgramData\\AutoPilotConfig\\Icons&#8221; md &#8220;C:\\ProgramData\\AutoPilotConfig\\Icons&#8221;<\/p>\n\n\n\n<p>xcopy &#8220;SharePointShortCut.ps1&#8221; &#8220;C:\\ProgramData\\AutoPilotConfig&#8221; \/Y<\/p>\n\n\n\n<p>xcopy &#8220;SharePointicon.ico&#8221; &#8220;C:\\ProgramData\\AutoPilotConfig\\Icons&#8221; \/Y<\/p>\n\n\n\n<p>Powershell.exe -Executionpolicy bypass -File &#8220;C:\\ProgramData\\AutoPilotConfig\\SharePointShortCut.ps1&#8221;<\/p>\n\n\n\n<p>First we create 2 folders:<br>\u2013 C:\\ProgramData\\AutoPilotConfig<br>\u2013 C:\\ProgramData\\AutoPilotConfig\\Icons<br><br>I always create these folders to run and store installation\/removal scripts. For example, when you have a custom application which requires a custom removal script this is where I store these scripts.<br><br>After that we copy the 2 files to these folders and last but not least we run the Powershell script. This script contains this code:<\/p>\n\n\n\n<p><strong>if<\/strong> (-not (Test-Path &#8220;C:\\Users\\Public\\Desktop\\SharePointOnline.url&#8221;))<\/p>\n\n\n\n<p>{<\/p>\n\n\n\n<p>$<strong>null<\/strong> = $WshShell = <strong>New<\/strong>-Object -comObject WScript.Shell<\/p>\n\n\n\n<p>$path = &#8220;C:\\Users\\Public\\Desktop\\SharePointOnline.url&#8221;<\/p>\n\n\n\n<p>$targetpath = &#8220;https:\/\/tenantname.sharepoint.com&#8221;<\/p>\n\n\n\n<p>$iconlocation = &#8220;C:\\ProgramData\\AutoPilotConfig\\Icons\\SharePointicon.ico&#8221;<\/p>\n\n\n\n<p>$iconfile = &#8220;IconFile=&#8221; + $iconlocation<\/p>\n\n\n\n<p>$Shortcut = $WshShell.CreateShortcut($path)<\/p>\n\n\n\n<p>$Shortcut.TargetPath = $targetpath<\/p>\n\n\n\n<p>$Shortcut.Save()<\/p>\n\n\n\n<p>Add-Content $path &#8220;HotKey=0&#8221;<\/p>\n\n\n\n<p>Add-Content $path &#8220;$iconfile&#8221;<\/p>\n\n\n\n<p>Add-Content $path &#8220;IconIndex=0&#8221;<\/p>\n\n\n\n<p>}<\/p>\n\n\n\n<p>If you want to deploy another Internet Shortcut then SharePoint Online please edit these values:<br><br>$path, is the value where the SharePoint is being stored.<br>$targetpath, is the URL where you want to lead the Shortcut too.<br>$iconlocation, is the value where the icon is stored.<br><br>Change these values and put another iconfile in the folder that you are going to package.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Packaging<\/h2>\n\n\n\n<p>We are going to use WinAppUtil. This application is needed to package applications in Microsoft Intune. You can download it here:&nbsp;<a href=\"https:\/\/github.com\/Microsoft\/Microsoft-Win32-Content-Prep-Tool\">Link<\/a><br><br>Open Powershell, run the WinAppUtil.exe and use the following values:<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/www.nielskok.tech\/wp-content\/uploads\/2020\/02\/image-9.png\" alt=\"\" class=\"wp-image-431\"\/><\/figure>\n\n\n\n<h2 class=\"wp-block-heading\">Deployment<\/h2>\n\n\n\n<p>Log on to the Intune Portal at https:\/\/devicemanagement.microsoft.com\/<br><br>Go to Apps:<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/www.nielskok.tech\/wp-content\/uploads\/2020\/01\/image-2.png\" alt=\"\" class=\"wp-image-318\"\/><\/figure>\n\n\n\n<p>After that go to Windows and add an App:<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/www.nielskok.tech\/wp-content\/uploads\/2020\/01\/image-3.png\" alt=\"\" class=\"wp-image-319\"\/><\/figure>\n\n\n\n<p>Add a Win32App:<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/www.nielskok.tech\/wp-content\/uploads\/2020\/01\/image-4.png\" alt=\"\" class=\"wp-image-320\"\/><\/figure>\n\n\n\n<p>Select app package file and browse to the SharePointShortCut.intunewin file.<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/www.nielskok.tech\/wp-content\/uploads\/2020\/01\/image-5.png\" alt=\"\" class=\"wp-image-322\"\/><\/figure>\n\n\n\n<p>Specify the package information:<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/www.nielskok.tech\/wp-content\/uploads\/2020\/02\/image-11.png\" alt=\"\" class=\"wp-image-441\"\/><\/figure>\n\n\n\n<p>Specify the installation instructions:<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/www.nielskok.tech\/wp-content\/uploads\/2020\/02\/image-12.png\" alt=\"\" class=\"wp-image-443\"\/><\/figure>\n\n\n\n<p>Install command: \u201cInstall.cmd\u201d<br>Uninstall command: del \/f \u201cC:\\Users\\Public\\Desktop\\SharePointOnline.url\u201d<br>Device restart behavior: \u201cno specific action\u201d<\/p>\n\n\n\n<p>Specify the requirements:<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/www.nielskok.tech\/wp-content\/uploads\/2020\/01\/image-10.png\" alt=\"\" class=\"wp-image-331\"\/><\/figure>\n\n\n\n<p>Use the following detection rule:<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/www.nielskok.tech\/wp-content\/uploads\/2020\/02\/image-13.png\" alt=\"\" class=\"wp-image-444\"\/><\/figure>\n\n\n\n<p>No depencies and no scope tags are assigned.<br><br>Assign the groups that need the application:<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/www.nielskok.tech\/wp-content\/uploads\/2020\/01\/image-12.png\" alt=\"\" class=\"wp-image-335\"\/><\/figure>\n\n\n\n<p>And we are done!<\/p>\n\n\n\n<p>Ref: <a href=\"https:\/\/www.nielskok.tech\/microsoft365\/deploy-internet-shortcut-with-custom-icon-via-intune-using-win32app\/\">Deploy Internet Shortcut with custom icon via Intune using Win32App (nielskok.tech)<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>By Niels Kok \u00a0 When we as IT People deploy Windows 10 AutoPilot we often get the feedback from users that they miss their shortcuts for SharePoint and such. For that reason I have created a manual which you can use to deploy this using a Win32App. Preparation Create a folder where you store the <a class=\"read-more\" href=\"https:\/\/SUMMALAI.COM\/?p=4773\">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":[1607,1608],"class_list":["post-4773","post","type-post","status-publish","format-standard","hentry","category-autopilot-intune","category-azure-microsoft","category-microsoft","tag-deploy-internet-shortcut-with-custom-icon-on-intune","tag-deploy-internet-shortcut-with-intune"],"aioseo_notices":[],"_links":{"self":[{"href":"https:\/\/SUMMALAI.COM\/index.php?rest_route=\/wp\/v2\/posts\/4773","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=4773"}],"version-history":[{"count":1,"href":"https:\/\/SUMMALAI.COM\/index.php?rest_route=\/wp\/v2\/posts\/4773\/revisions"}],"predecessor-version":[{"id":4774,"href":"https:\/\/SUMMALAI.COM\/index.php?rest_route=\/wp\/v2\/posts\/4773\/revisions\/4774"}],"wp:attachment":[{"href":"https:\/\/SUMMALAI.COM\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=4773"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/SUMMALAI.COM\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=4773"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/SUMMALAI.COM\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=4773"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}