pinkfluffyunicorn
Goto Top

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?

Content-Key: 296030

Url: https://administrator.de/contentid/296030

Printed on: April 18, 2024 at 23:04 o'clock

Member: Snowman25
Snowman25 Feb 12, 2016 at 14:10:43 (UTC)
Goto Top
Hallo @pfu,

schonmal geschaut, ob Services diese Prozesse neu starten?
Dann sind diese nämlich so eingestellt, dass sie die Prozesse neu starten, wenn sie sterben.

kein Gruß
Member: PinkFLuffyUnicorn
PinkFLuffyUnicorn Feb 12, 2016 at 14:30:14 (UTC)
Goto Top
steh grad aufm schlauch, wo kann ich dass nochmal sehen und wenn das so is kann ich das über powershell deaktivieren oder irgendwie unterbinden?
Mitglied: 126919
126919 Feb 12, 2016 updated at 14:43:20 (UTC)
Goto Top
Erste Stunde Windows Grundlagen ....
Set-Service -Name "BlaBlub" -StartupType Disabled  

fk
Member: PinkFLuffyUnicorn
PinkFLuffyUnicorn Feb 12, 2016 at 14:45:24 (UTC)
Goto Top
danke :D bist der beste XD
Member: SaschaRD
Solution SaschaRD Feb 12, 2016, updated at Feb 15, 2016 at 13:57:43 (UTC)
Goto Top
Hallo,

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"  
}
Gruß, Sascha
Member: PinkFLuffyUnicorn
PinkFLuffyUnicorn Feb 13, 2016 at 14:51:24 (UTC)
Goto Top
ist aber für Dienste und nicht für Prozesse, beim Skype host z.B. geht das net
Member: SaschaRD
Solution SaschaRD Feb 15, 2016 updated at 13:57:38 (UTC)
Goto Top
Hallo,

ist aber für Dienste und nicht für Prozesse, beim Skype host z.B. geht das net
Wäre mir neu das Get-Process (siehe Zeile 2 vom oberen Code) für Dienste ist face-wink

Gruß, Sascha
Member: PinkFLuffyUnicorn
PinkFLuffyUnicorn Feb 15, 2016 at 18:31:44 (UTC)
Goto Top
sorry, war in Gedanken in nem andern thread :D