Skip to content

Commit

Permalink
fix: try sleep to wait for kill
Browse files Browse the repository at this point in the history
  • Loading branch information
DaRacci committed May 20, 2024
1 parent 9a69bba commit 4edde28
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/n-sight/Fix-AgentUpdateLoop.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,7 @@ function killProcesses () {
$process = get-process -ProcessName winagent -ErrorAction Stop
writeToLog V "winagent.exe is still running. Attempting to stop."
$process | Stop-Process -Force
Start-Sleep -Seconds 3;
$process = get-process -ProcessName winagent -ErrorAction Stop
writeToLog E "winagent.exe is still running. This device will need manual intervention."
exit 1
Expand Down

0 comments on commit 4edde28

Please sign in to comment.