Forum Discussion
Jesse13579
Jan 10, 2024Brass Contributor
Intune installed desktop shortcut needs to be removed
I created 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...
- Jan 11, 2024The detection is OK if you want the shortcut removed. You must assign a group to Uninstall the program, and it will run the uninstall script. The detection will check again to see if the file is still there. If not, The removal of the shortcut should be complete.
What does your uninstall command line look like? It should be powershell.exe -Executionpolicy Bypass -File .\uninstall.ps1
Jesse13579
Jan 11, 2024Brass Contributor
For my requirements I set it for 32 and 64 bit and the min operating system is windows 10 1607. My detection rule is manually configured and file rule type. The path is c:\users\public\desktop and the file or folder is ukg.lnk. The detection method is file or folder exists. It could be my install and uninstall command. I've tried a few things for those but now that I think about it that could be the problem. Do you have any suggestions on how to set those up?
Jan 11, 2024
The detection is OK if you want the shortcut removed. You must assign a group to Uninstall the program, and it will run the uninstall script. The detection will check again to see if the file is still there. If not, The removal of the shortcut should be complete.
What does your uninstall command line look like? It should be powershell.exe -Executionpolicy Bypass -File .\uninstall.ps1
What does your uninstall command line look like? It should be powershell.exe -Executionpolicy Bypass -File .\uninstall.ps1
- Jan 11, 2024No problem!
- Jesse13579Jan 11, 2024Brass ContributorFor whatever reason after making that change to the uninstall it is now working. I removed the desktop shortcut from the test pcs and I've pushed it out to the other machines. I've had a full success rate so far. I greatly appreciate all the help and patience.
- Jan 11, 2024
Jesse13579 Yes 😄 Great to hear!
Please click Mark as Best Response & Like if my post helped you to solve your issue.
This will help others to find the correct solution easily. It also closes the item.
If one of the posts was helpful in other ways, please consider giving it a Like. - Jesse13579Jan 11, 2024Brass ContributorI just added it and it's running now. I greatly appreciate all the help. This has driving me crazy for a few days now.
- Jan 11, 2024Could you add this to the top of the script: Start-Transcript c:\windows\temp\log.txt ? And this at the end: Stop-Transcript. Create a new .intunewin file again, deploy it, watch the status, and check c:\windows\temp\log.txt afterward...
- Jesse13579Jan 11, 2024Brass ContributorI have my all endpoints group assigned to uninstall. I installed it to that group to begin with.
- Jan 11, 2024That should also work, -File is just for clarity. Ok... Then the assignment part, did you assign a group to uninstall the software?
- Jesse13579Jan 11, 2024Brass ContributorThat might be my problem. My uninstall was Powershell.exe -Executionpolicy Bypass .\uninstall.ps1. I'll make the change and see what happens.