Forum Discussion
Removing start up websites on log in
Hi all,
I was wondering if you can help me I have set up a website to start up on log in via script
Script:
param(
[string]$ShortcutName = "Bromcom",
[string]$ShortcutUrl = "https://cloudmis.bromcom.com/Nucleus/Framework/Login.aspx",
[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
}
$Shortcut.Save()
How do I get it to remove remotely via intune or script?
AB21805
This should be the solution:$ShortcutName = "Bromcom" Remove-Item -Path "$($env:ALLUSERSPROFILE)\Microsoft\Windows\Start Menu\Programs\Startup\$ShortcutName.lnk"
- Jannik_ReinhardIron Contributor
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?
- AB21805Bronze ContributorYes 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
- Jannik_ReinhardIron Contributor
AB21805
This should be the solution:$ShortcutName = "Bromcom" Remove-Item -Path "$($env:ALLUSERSPROFILE)\Microsoft\Windows\Start Menu\Programs\Startup\$ShortcutName.lnk"