by Gladdyu · 7y ago · 0 comments
PS> $lockedFile="C:\Windows\System32\wshtcpip.dll"
PS> Get-Process | foreach{$processVar = $_;$_.Modules | foreach{if($_.FileName -eq $lockedFile){$processVar.Name + " PID:" + $processVar.id}}} PS C:\> gps |? {$_.Modules.FileName -match "wshtcpip\.dll"} | select name, idObviously.
The super annoying thing is when the OS doesn't try to tell you which process(es) keeps it open and doesn't even ship with built in tooling to let you find out on your own.
I think that is the point GP tries to make.
Or, imagine every copy of Word you have running is using a different set of binaries.
No, thank you.
Yeah, it should come with the OS, but that's Windows for you.
I use it in Win 7; I think it works most of the time (not always).