remove
2 TopicsIntune installed desktop shortcut needs to be removed
Icreated a desktop shortcut via intune windows app (win 32). Here is my script New-Item -Path "c:" -Name "mem" -ItemType "directory" -Force Copy-Item "S:\Shortcuts\UKG.ico" -Destination "c:\mem\UKG.ico" $Shell = New-Object -ComObject ("WScript.Shell") $ShortCut = $Shell.CreateShortcut("C:\users\public\desktop\UKG.lnk") $ShortCut.TargetPath="-------------------------------------" $Shortcut.Arguments="------------------------------------" $ShortCut.IconLocation = "c:\mem\UKG.ico"; $ShortCut.Description = "UKG Shortcut"; $ShortCut.Save() (I replaced the path with ————————) The app works fine and copies the ico file from a network share and places it on the c drive in a folder it creates named mem. Now after creating the shortcut they have decided to use SSO which is a new address. I need to delete the ico file in the mem folder and remove the desktop shortcut. I created a simple script. $ShortcutFile = "$env:Public\Desktop\UKG.lnk" if (Test-Path $ShortcutFile){ Remove-Item $ShortcutFile } else { Write-Output "Shortcut Not Found" } To just delete the shortcut. When I run the script as an admin in powershell it works just fine. If I try and run the script in a normal powershell it fails and says it doesn't have access to the public desktop. I ran the file in Intune as just a script and it fails. I converted it to an intunewin file and added it as an intune windows app (win 32). It successfuly runs on all my pcs but does not remove the icon. I'm at a loss and I really need to remove this icon so I can push the new one. Any suggestions on how to remove it via a script or app? I've checked into remediation scripts but that isn't going to be an option for now.Solved5.1KViews0likes23CommentsHow to Uninstall an application assigned to All Devices in phased approach on Intune for Android
Hi, We currently have a 4000+ device estate on Intune, mainly consisting of Samsung Android Devices. When we migrated our phones to Intune, we deployed Samsung Calendar as a "System App" to "All devices" from inside Intune as Samsung Knox has been set to hide all System Apps. We've now come to a point where we want to remove Samsung Calendar from all phones as the preferred option is to use Calendar from inside the Outlook app. However, we want to remove Samsung Calendar in a phased approach. The first part of this is pretty easy, we've created a removal group and assigned it to exclude devices from "Required" and include it under "Uninstall" - This ensures the devices we put inside the removal group will have Samsung Calendar removed and won't be included as part of "All devices" However, This won't stop new devices enrolling into Intune downloading Samsung Calendar as we've still got the "All devices" option under Required and we don't want to keep putting new devices into the removal group. I'm worried that if I remove "All devices" from the Required section, that it will uninstall Calendar from all existing devices (including the one's we've not put in the removal group yet), which makes our phased approach null and void - is this correct? I can't exactly risk trying it because by the time I find out, it will be too late. Any help and Advice would be great. Thank you.2.6KViews0likes1Comment