Benutzer mit den meisten Antworten
Stop-Process (path)

Frage
-
Hello,
how can I stop a single executive file, e.g. a specific Access-Database running.
Stop-Process -name MSACCESS | -select commandline C:\Desktop\...?!
Just the first Access-Database shoud be stopped...
Get-Process -name MSACCESS
Handles NPM(K) PM(K) WS(K) CPU(s) Id SI ProcessName
------- ------ ----- ----- ------ -- -- -----------
943 50 62564 96144 6,06 7208 9 MSACCESS
1025 63 30460 69708 5,95 9108 9 MSACCESSThanks for support in advance
Antworten
-
Hi,
you could work with the MainWindowTitle property:
Get-Process | where {$_.MainWindowTitle -like "*c:\databases\MyDB01.accdb*"} | Stop-Process
Evgenij Smirnov
I work @ msg services ag, Berlin -> http://www.msg-services.de
I blog (in German) @ http://it-pro-berlin.de
my stuff in PSGallery --> https://www.powershellgallery.com/profiles/it-pro-berlin.de/
Exchange User Group, Berlin -> http://exusg.de
Windows Server User Group, Berlin -> http://www.winsvr-berlin.de
Mark Minasi Technical Forum, reloaded -> http://newforum.minasi.com- Als Antwort markiert Denniver ReiningMVP, Moderator Donnerstag, 16. Februar 2017 16:00
Alle Antworten
-
Hi,
you could work with the MainWindowTitle property:
Get-Process | where {$_.MainWindowTitle -like "*c:\databases\MyDB01.accdb*"} | Stop-Process
Evgenij Smirnov
I work @ msg services ag, Berlin -> http://www.msg-services.de
I blog (in German) @ http://it-pro-berlin.de
my stuff in PSGallery --> https://www.powershellgallery.com/profiles/it-pro-berlin.de/
Exchange User Group, Berlin -> http://exusg.de
Windows Server User Group, Berlin -> http://www.winsvr-berlin.de
Mark Minasi Technical Forum, reloaded -> http://newforum.minasi.com- Als Antwort markiert Denniver ReiningMVP, Moderator Donnerstag, 16. Februar 2017 16:00
-
McRiccle, this is the german forum, so please either post your question in the english forum or continue in german. Thanks!
Blog: http://bytecookie.wordpress.com
Kostenloser Powershell Code Manager v5: Link
(u.a. Codesnippets verwalten + komplexe Scripte graphisch darstellen)
Hilf mit und markiere hilfreiche Beiträge mit dem "Abstimmen"-Button (links) und Beiträge die eine Frage von dir beantwortet haben, als "Antwort" (unten).
Warum das Ganze? Hier gibts die Antwort.