Removing start up websites on log in

Steel Contributor

Hi all, 


I was wondering if you can help me I have set up a website to start up on log in via script 




[string]$ShortcutName = "Bromcom",
[string]$ShortcutUrl = "",
[string]$ShortcutIconLocation = "1544681534/Bromcom+use.ico"

$WScriptShell = New-Object -ComObject WScript.Shell

$Shortcut = $WScriptShell.CreateShortcut("$env:ALLUSERSPROFILE\Microsoft\Windows\Start Menu\Programs\Startup\$ShortcutName.lnk")
$Shortcut.TargetPath = $ShortcutUrl
if ($ShortcutIconLocation) {
$Shortcut.IconLocation = $ShortcutIconLocation



How do I get it to remove remotely via intune or script? 



4 Replies

@AB21805  You can deploy a Powershell script or and endpoint analytics remediation script to remove this script on the local device. Is it triggered via an schedule task? 



Yes I have deployed a script however I am unsure on what the script would be if I wanted to remove the website I set to start up at log on
best response confirmed by AB21805 (Steel Contributor)

This should be the solution:




$ShortcutName = "Bromcom"
Remove-Item -Path "$($env:ALLUSERSPROFILE)\Microsoft\Windows\Start Menu\Programs\Startup\$ShortcutName.lnk"





Just out of curiosity, why would I use Powershell script over endpoint analytics remediation scrip or vice versa?