Nov 25 2022 02:53 AM
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?
Nov 25 2022 09:16 AM
@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?
Nov 25 2022 09:41 AM
Nov 26 2022 03:11 AM - edited Nov 26 2022 03:13 AM
Solution@AB21805
This should be the solution:
$ShortcutName = "Bromcom"
Remove-Item -Path "$($env:ALLUSERSPROFILE)\Microsoft\Windows\Start Menu\Programs\Startup\$ShortcutName.lnk"
Nov 28 2022 11:56 PM
Nov 26 2022 03:11 AM - edited Nov 26 2022 03:13 AM
Solution@AB21805
This should be the solution:
$ShortcutName = "Bromcom"
Remove-Item -Path "$($env:ALLUSERSPROFILE)\Microsoft\Windows\Start Menu\Programs\Startup\$ShortcutName.lnk"