Last active
October 4, 2020 14:17
-
-
Save cverbiest/da2485c16cc593988ac462bb168ae570 to your computer and use it in GitHub Desktop.
OpenEdge Powershell snippets
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Kill all PDSOE AVM processes | |
# These prowin processes have -wy in the commandline | |
$Filter = "Name like '%prowin%' and Commandline like '% -wy %' " | |
Write-Host "Filter $Filter" | |
Get-WmiObject Win32_Process -Filter "$Filter" | | |
foreach-object ` | |
-begin { Write-Host 'begin' } ` | |
-process { | |
Write-Host 'Kill' $_.Commandline $_. | |
$_.Terminate() | |
} ` | |
-end { Write-Host 'end' } | |
Start-Sleep -s 10 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# List all _mprosrv processes with their commandline showing the database path | |
$process = "_mprosrv.exe" | |
Get-WmiObject Win32_Process -Filter "name = '$process'" | Select-Object CommandLine | Out-String -Width 4096 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment