Created
September 13, 2018 16:50
-
-
Save chrdek/96abd42bb7b4a3d395b74a1f7260f410 to your computer and use it in GitHub Desktop.
export specific processes to file
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
$d=(gps chrome*,security*|Select ProcessName,Id -First 1 -Last 1);$c=[String]::Concat($d.ProcessName.SubString(0,1).toLower());$o=$c[1]+$c[0];$v=$d[0].ProcessName+","+$d[0].Id+","+$d[1].ProcessName+","+$d[1].Id;Start-Process powershell.exe -ArgumentList @($o,"-Value $v","-Path .\Out1.txt"); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment