Powershell Hintergrundprozesse richtig beenden
Hi, ich habe das Problem dass wenn ich Hintergrundprozesse wie Skype etc via Powershell im Adminmodus beenden will, sie kurz beendet sind, sich dann aber wieder neu starten. wie kann ich das unterbinden? Und wie kann ich Prozesse wie Gamescanner von Razors Gamebooster beenden? weil immer wenn ich " Stop-Process -name GameScannerService ", egal ob über Script oder Konsole starte, kommt folgende Fehlermeldung: Stop-Process: Das Handle ist ungültig (Ausnahme von HRESULT: 0x80070006 (E_HANDLE)). wie kann ich das lösen?
Please also mark the comments that contributed to the solution of the article
Content-Key: 296030
Url: https://administrator.de/contentid/296030
Printed on: April 18, 2024 at 23:04 o'clock
8 Comments
Latest comment
Erste Stunde Windows Grundlagen ....
fk
Set-Service -Name "BlaBlub" -StartupType Disabled
fk
Hallo,
beenden:Gruß, Sascha
beenden:
function CheckRunningApplications($ApplicationName){
$CheckRunningApplication = Get-Process $ApplicationName | fw -column 1
IF ($getApplicationError -and ($getApplicationError | foreach ($_.FullyQualifiedErrorId -like "*NoProccessFoundForGivenName*"))){
Write-Host "Exception Message: There is no application named $ApplicationName"
} ELSE {
Write-Host "$ApplicationName is now running"
TASKKILL /F /T /IM "$ApplicationName.exe"
Write-Host "$ApplicationName is now stopped"
}
}
function CheckRunningSkype {
CheckRunningApplications -ApplicationName "Skype"
}
function CheckRunningRazorGamebooster {
CheckRunningApplications -ApplicationName "Razors Gamebooster"
}