Remove desktop icons Intune
Ever since endpoint device management gravitated towards Intune (aka Microsoft Endpoint Management or MEM), the need for SOE management (Standard Operating Environment) for end user devices has become a prime requirement. A small but important part of this is implementing Windows 10 customizations to suit organizational needs. I recently had to implement the same for a customer so wanted to cover some unique & specific aspects through this blog. Desktop Icons Customization If you are anything like me who likes his desktop clean or have a similar SOE requirement in your organization then the following method may just help you. A Powershell script can be used to clean the desktop for all the unwanted icons and place custom icons like This PC shortcut. I did the same for devices that were getting provisioned using Autopilot. Please note that this will nuke all the icons for all user profiles so use it carefully. Get-ChildItem $env:Public\Desktop\*.lnk | ForEach-Object {Remove-item $_ } $WshShell = New-Object -ComObject WScript.Shell $Shortcut = $WshShell.CreateShortcut("C:\users\public\Desktop\This PC.lnk") $Shortcut.TargetPath = [environment]::getfolderpath("mycomputer") $Shortcut.Save() Start Menu URL shortcuts for Tiles There are multiple ways of pinning URL tiles in the Start Menu. The easiest & most consistent method I have found is using a script to create the url based shortcuts on the fly for the purpose of using them in the start menu layout. This way one doesnt have to worry about creating & then copying the files during a deployment. The script below will create 2 url shortcuts and place them under the C:\ProgramData\Microsoft\Windows\Start Menu\Programs path. $WshShell = New-Object -ComObject WScript.Shell $Shortcut1 = $WshShell.CreateShortcut("C:\ProgramData\Microsoft\Windows\Start Menu\Programs\xxxxxx Sharepoint.url") $Shortcut2 = $WshShell.CreateShortcut("C:\ProgramData\Microsoft\Windows\Start Menu\Programs\xxxxxx Yammer.url") $Shortcut1.TargetPath = "https://xxxxxx.sharepoint.com" $Shortcut2.TargetPath = "https://www.yammer.com/xxxxxx.com" $Shortcut1.Save() $Shortcut2.Save() At this point the work is only half done as we will need to export the Start menu layout xml and import it in Intune. Let us see how that is done. Start Menu & Task Bar Customizations Using a reference PC, create a Start menu layout of your choice and then run the following commands using logged in user credentials. Export-StartLayout -UseDesktopApplicationID -Path StartLayoutMarketing.xml -pathis a required parameter that specifies the path and file name for the export file. You can specify a local path to which you have access like C:\Temp\StartLayoutMarketing.xml or a UNC path (for example, \\FileServer01\StartLayouts\StartLayoutMarketing.xml) Once the xml is exported, add the Taskbar layout elements as shown below. xmlns:taskbar="http://schemas.microsoft.com/Start/2014/TaskbarLayout">
Now we import the desktop cleanup, shortcut creation scripts and the start menu layout in Intune. To import the scripts, follow the process below.
To configure the Startmenu layout policy, follow the process below.
End Result All the icons are deleted and This PC shortcut is placed on the desktop. Start menu layout gets applied with the url shortcuts pinned. Url shortcuts are created in the C:\ProgramData\Microsoft\Windows\Start Menu\Programs path. |