Danke für deine Info hab es momentan über Autostart gelöst mangels Zeit.
werde noch ein powershell script erstllen, ungefähr so wenn mein Powershell problem gelöst ist
ABB-Tray.ps1
------------------------------------------------------
Add-Type -AssemblyName System.Windows.Forms
Add-Type -AssemblyName System.Drawing
$notifyIcon = New-Object System.Windows.Forms.NotifyIcon
$notifyIcon.Icon = [System.Drawing.SystemIcons]::Information
$notifyIcon.Visible = $true
$notifyIcon.Text = "ABB Status wird geprüft..."
$timer = New-Object System.Windows.Forms.Timer
$timer.Interval = 5000
$timer.Add_Tick({
$abb = Get-Process -Name "abbagent" -ErrorAction SilentlyContinue
if ($abb) {
$notifyIcon.Icon = [System.Drawing.SystemIcons]::Shield
$notifyIcon.Text = "

ABB Sicherung läuft"
} else {
$notifyIcon.Icon = [System.Drawing.SystemIcons]::Application
$notifyIcon.Text = "

ABB inaktiv"
}
})
$notifyIcon.Add_Click({
powershell.exe -ExecutionPolicy Bypass -File "$PSScriptRoot\ABB-GUI.ps1"
})
$timer.Start()
[System.Windows.Forms.Application]::Run()
-------------------------------------------------------