Como eu determino com powershell os PIDs das guias do Chrome anônimas?

2

Como por este site o caminho para iniciar o chome na incógnito na linha de comando é

& "C:\Program Files (x86)\Google\Chrome\Application\chrome.exe" -incognito

(editado para trabalhar no powershell)

Eu posso obter uma lista de todos os meus Pids e linha de comando do processo chrome com um único liner:

Get-CimInstance Win32_Process -Filter "name = 'chrome.exe'" | Select ProcessId, CommandLine| fl *|clip

No entanto, nenhum dos processos anônimos, seja s = iniciado por Ctrl + Shift + N ou pela linha de comando, possui esse argumento de linha de comando:

ProcessId   : 29600
CommandLine : "C:\Program Files (x86)\Google\Chrome\Application\chrome.exe" --flag-switches-begin --flag-switches-end

ProcessId   : 12588
CommandLine : "C:\Program Files (x86)\Google\Chrome\Application\chrome.exe" --type=crashpad-handler 
              "--user-data-dir=C:\Users\justin.dearing\AppData\Local\Google\Chrome\User Data" /prefetch:7 
              --monitor-self-annotation=ptype=crashpad-handler 
              "--database=C:\Users\justin.dearing\AppData\Local\Google\Chrome\User Data\Crashpad" 
              "--metrics-dir=C:\Users\justin.dearing\AppData\Local\Google\Chrome\User Data" 
              --url=https://clients2.google.com/cr/report --annotation=channel= --annotation=plat=Win64 
              --annotation=prod=Chrome --annotation=ver=63.0.3239.132 
              --initial-client-data=0x1e4,0x1e8,0x1ec,0x1e0,0x1f0,0x7ffb01b85720,0x7ffb01b85760,0x7ffb01b85738

ProcessId   : 30604
CommandLine : "C:\Program Files (x86)\Google\Chrome\Application\chrome.exe" --type=watcher --main-thread-id=23004 
              --on-initialized-event-handle=616 --parent-handle=620 /prefetch:6

ProcessId   : 29940
CommandLine : "C:\Program Files (x86)\Google\Chrome\Application\chrome.exe" --type=gpu-process 
              --field-trial-handle=1456,10619170367124795314,15493821474693019085,131072 --gpu-vendor-id=0x8086 
              --gpu-device-id=0x193a --gpu-driver-vendor="Intel Corporation" --gpu-driver-version=22.20.16.4749 
              --gpu-driver-date=7-24-2017 --gpu-secondary-vendor-ids=0x102b --gpu-secondary-device-ids=0x0533 
              --service-request-channel-token=2E7DF9AEE477D14FE59C25335C71A2CC --mojo-platform-channel-handle=1560 
              --ignored=" --type=renderer " /prefetch:2

ProcessId   : 35036
CommandLine : "C:\Program Files (x86)\Google\Chrome\Application\chrome.exe" --type=utility 
              --field-trial-handle=1456,10619170367124795314,15493821474693019085,131072 --lang=en-US 
              --service-sandbox-type=utility --service-request-channel-token=EA3B8A022A6691EC43DEF92EA41799E3 
              --mojo-platform-channel-handle=3796 --ignored=" --type=renderer " /prefetch:8

ProcessId   : 9688
CommandLine : "C:\Program Files (x86)\Google\Chrome\Application\chrome.exe" --no-first-run --no-default-browser-check  
              "data:text/html;charset=utf-8,%3Chead%3E%3C/head%3E%3Cbody%3E%3Cstyle%3Ebody%7Bmargin:25px;font:16px%20ca
              libri,'segoe%20ui'%7D%3C/style%3E%3Ch3%3EChrome%20script%20debugging%20in%20Visual%20Studio%20is%20enable
              d%3C/h3%3E%3Cul%3E%3Cli%3ESet%20breakpoints%20in%20JavaScript/TypeScript%20in%20Visual%20Studio%3C/li%3E%
              3Cli%3EAutomatically%20break%20on%20script%20errors%3C/li%3E%3Cli%3EOpening%20developer%20tools%20in%20Ch
              rome%20stops%20the%20script%20debugging%20session%3C/li%3E%3C/ul%3E%3Ca%20href='https://aka.ms/chromedebu
              gging'%20target='_blank'%3ELearn%20more%20about%20Chrome%20debugging%20in%20Visual%20Studio%3C/a%3E%3Ch4%
              3E%3Ci%3EYour%20application%20is%20starting...%3C/i%3E%3C/h4%3E%3C/body%3E%3C!--a43b36c9-654f-4ac6-a825-8
              6dab529cb46--%3E"  --remote-debugging-port=64275 "--user-data-dir=C:\Users\justin.dearing\AppData\Local\M
              icrosoft\VisualStudio.0_cf8b40b5\WebTools\ChromeUserData_B1BEBFE6_D97D9A83-D0C1-4583-B7FA-995316F620C4
              "

ProcessId   : 38284
CommandLine : "C:\Program Files (x86)\Google\Chrome\Application\chrome.exe" --type=crashpad-handler --user-data-dir=C:\
              Users\justin.dearing\AppData\Local\Microsoft\VisualStudio.0_cf8b40b5\WebTools\ChromeUserData_B1BEBFE6_
              D97D9A83-D0C1-4583-B7FA-995316F620C4 /prefetch:7 --monitor-self-annotation=ptype=crashpad-handler --datab
              ase=C:\Users\justin.dearing\AppData\Local\Microsoft\VisualStudio.0_cf8b40b5\WebTools\ChromeUserData_B1
              BEBFE6_D97D9A83-D0C1-4583-B7FA-995316F620C4\Crashpad --metrics-dir=C:\Users\justin.dearing\AppData\Local\
              Microsoft\VisualStudio.0_cf8b40b5\WebTools\ChromeUserData_B1BEBFE6_D97D9A83-D0C1-4583-B7FA-995316F620C
              4 --url=https://clients2.google.com/cr/report --annotation=channel= --annotation=plat=Win64 
              --annotation=prod=Chrome --annotation=ver=63.0.3239.132 
              --initial-client-data=0x1e0,0x1e4,0x1e8,0x1dc,0x1ec,0x7ffb01b85720,0x7ffb01b85760,0x7ffb01b85738

ProcessId   : 24784
CommandLine : "C:\Program Files (x86)\Google\Chrome\Application\chrome.exe" --type=watcher --main-thread-id=30348 
              --on-initialized-event-handle=648 --parent-handle=652 /prefetch:6

ProcessId   : 20216
CommandLine : "C:\Program Files (x86)\Google\Chrome\Application\chrome.exe" --type=gpu-process 
              --field-trial-handle=1476,13650494111419134215,3798386338761244993,131072 --user-data-dir="C:\Users\justi
              n.dearing\AppData\Local\Microsoft\VisualStudio.0_cf8b40b5\WebTools\ChromeUserData_B1BEBFE6_D97D9A83-D0
              C1-4583-B7FA-995316F620C4" --gpu-vendor-id=0x8086 --gpu-device-id=0x193a --gpu-driver-vendor="Intel 
              Corporation" --gpu-driver-version=22.20.16.4749 --gpu-driver-date=7-24-2017 
              --gpu-secondary-vendor-ids=0x102b --gpu-secondary-device-ids=0x0533 --user-data-dir="C:\Users\justin.dear
              ing\AppData\Local\Microsoft\VisualStudio.0_cf8b40b5\WebTools\ChromeUserData_B1BEBFE6_D97D9A83-D0C1-458
              3-B7FA-995316F620C4" --service-request-channel-token=82E278E4387AD1A0720CEC16AF70DC34 
              --mojo-platform-channel-handle=1496 --ignored=" --type=renderer " /prefetch:2

ProcessId   : 10876
CommandLine : "C:\Program Files (x86)\Google\Chrome\Application\chrome.exe" --type=renderer 
              --field-trial-handle=1476,13650494111419134215,3798386338761244993,131072 
              --service-pipe-token=ADD9924CCB03D545CC0E0AA6AAF8683D --lang=en-US --user-data-dir="C:\Users\justin.deari
              ng\AppData\Local\Microsoft\VisualStudio.0_cf8b40b5\WebTools\ChromeUserData_B1BEBFE6_D97D9A83-D0C1-4583
              -B7FA-995316F620C4" --enable-offline-auto-reload --enable-offline-auto-reload-visible-only --blink-settin
              gs=disallowFetchForDocWrittenScriptsInMainFrame=false,disallowFetchForDocWrittenScriptsInMainFrameOnSlowC
              onnections=true --enable-pinch --device-scale-factor=1 --num-raster-threads=4 
              --enable-main-frame-before-activation --enable-gpu-async-worker-context --content-image-texture-target=0,
              0,3553;0,1,3553;0,2,3553;0,3,3553;0,4,3553;0,5,3553;0,6,3553;0,7,3553;0,8,3553;0,9,3553;0,10,3553;0,11,35
              53;0,12,3553;0,13,3553;0,14,3553;0,15,3553;0,16,3553;0,17,3553;1,0,3553;1,1,3553;1,2,3553;1,3,3553;1,4,35
              53;1,5,3553;1,6,3553;1,7,3553;1,8,3553;1,9,3553;1,10,3553;1,11,3553;1,12,3553;1,13,3553;1,14,3553;1,15,35
              53;1,16,3553;1,17,3553;2,0,3553;2,1,3553;2,2,3553;2,3,3553;2,4,3553;2,5,3553;2,6,3553;2,7,3553;2,8,3553;2
              ,9,3553;2,10,3553;2,11,3553;2,12,3553;2,13,3553;2,14,3553;2,15,3553;2,16,3553;2,17,3553;3,0,3553;3,1,3553
              ;3,2,3553;3,3,3553;3,4,3553;3,5,3553;3,6,3553;3,7,3553;3,8,3553;3,9,3553;3,10,3553;3,11,3553;3,12,3553;3,
              13,3553;3,14,3553;3,15,3553;3,16,3553;3,17,3553;4,0,3553;4,1,3553;4,2,3553;4,3,3553;4,4,3553;4,5,3553;4,6
              ,3553;4,7,3553;4,8,3553;4,9,3553;4,10,3553;4,11,3553;4,12,3553;4,13,3553;4,14,3553;4,15,3553;4,16,3553;4,
              17,3553;5,0,3553;5,1,3553;5,2,3553;5,3,3553;5,4,3553;5,5,3553;5,6,3553;5,7,3553;5,8,3553;5,9,3553;5,10,35
              53;5,11,3553;5,12,3553;5,13,3553;5,14,3553;5,15,3553;5,16,3553;5,17,3553;6,0,3553;6,1,3553;6,2,3553;6,3,3
              553;6,4,3553;6,5,3553;6,6,3553;6,7,3553;6,8,3553;6,9,3553;6,10,3553;6,11,3553;6,12,3553;6,13,3553;6,14,35
              53;6,15,3553;6,16,3553;6,17,3553 --service-request-channel-token=ADD9924CCB03D545CC0E0AA6AAF8683D 
              --renderer-client-id=4 --mojo-platform-channel-handle=2696 /prefetch:1

ProcessId   : 17564
CommandLine : "C:\Program Files (x86)\Google\Chrome\Application\chrome.exe" --type=utility 
              --field-trial-handle=1476,13650494111419134215,3798386338761244993,131072 --lang=en-US 
              --service-sandbox-type=utility --user-data-dir="C:\Users\justin.dearing\AppData\Local\Microsoft\VisualStu
              dio.0_cf8b40b5\WebTools\ChromeUserData_B1BEBFE6_D97D9A83-D0C1-4583-B7FA-995316F620C4" 
              --service-request-channel-token=ADFC87A17EA167684C81F26EC064A7D5 --mojo-platform-channel-handle=3620 
              --ignored=" --type=renderer " /prefetch:8

ProcessId   : 39788
CommandLine : "C:\Program Files (x86)\Google\Chrome\Application\chrome.exe" --no-first-run --no-default-browser-check  
              "data:text/html;charset=utf-8,%3Chead%3E%3C/head%3E%3Cbody%3E%3Cstyle%3Ebody%7Bmargin:25px;font:16px%20ca
              libri,'segoe%20ui'%7D%3C/style%3E%3Ch3%3EChrome%20script%20debugging%20in%20Visual%20Studio%20is%20enable
              d%3C/h3%3E%3Cul%3E%3Cli%3ESet%20breakpoints%20in%20JavaScript/TypeScript%20in%20Visual%20Studio%3C/li%3E%
              3Cli%3EAutomatically%20break%20on%20script%20errors%3C/li%3E%3Cli%3EOpening%20developer%20tools%20in%20Ch
              rome%20stops%20the%20script%20debugging%20session%3C/li%3E%3C/ul%3E%3Ca%20href='https://aka.ms/chromedebu
              gging'%20target='_blank'%3ELearn%20more%20about%20Chrome%20debugging%20in%20Visual%20Studio%3C/a%3E%3Ch4%
              3E%3Ci%3EYour%20application%20is%20starting...%3C/i%3E%3C/h4%3E%3C/body%3E%3C!--0b9eee99-1dba-447e-844c-2
              a8cd0109b81--%3E"  --remote-debugging-port=64341 "--user-data-dir=C:\Users\justin.dearing\AppData\Local\M
              icrosoft\VisualStudio.0_cf8b40b5\WebTools\ChromeUserData_B1BEBFE6_4EE129EE-51D5-41C6-9273-B23F70292D3A
              "

ProcessId   : 35380
CommandLine : "C:\Program Files (x86)\Google\Chrome\Application\chrome.exe" --type=crashpad-handler --user-data-dir=C:\
              Users\justin.dearing\AppData\Local\Microsoft\VisualStudio.0_cf8b40b5\WebTools\ChromeUserData_B1BEBFE6_
              4EE129EE-51D5-41C6-9273-B23F70292D3A /prefetch:7 --monitor-self-annotation=ptype=crashpad-handler --datab
              ase=C:\Users\justin.dearing\AppData\Local\Microsoft\VisualStudio.0_cf8b40b5\WebTools\ChromeUserData_B1
              BEBFE6_4EE129EE-51D5-41C6-9273-B23F70292D3A\Crashpad --metrics-dir=C:\Users\justin.dearing\AppData\Local\
              Microsoft\VisualStudio.0_cf8b40b5\WebTools\ChromeUserData_B1BEBFE6_4EE129EE-51D5-41C6-9273-B23F70292D3
              A --url=https://clients2.google.com/cr/report --annotation=channel= --annotation=plat=Win64 
              --annotation=prod=Chrome --annotation=ver=63.0.3239.132 
              --initial-client-data=0x1e0,0x1e4,0x1e8,0x1dc,0x1ec,0x7ffb01b85720,0x7ffb01b85760,0x7ffb01b85738

ProcessId   : 17104
CommandLine : "C:\Program Files (x86)\Google\Chrome\Application\chrome.exe" --type=watcher --main-thread-id=5852 
              --on-initialized-event-handle=644 --parent-handle=648 /prefetch:6

ProcessId   : 17968
CommandLine : "C:\Program Files (x86)\Google\Chrome\Application\chrome.exe" --type=gpu-process 
              --field-trial-handle=1428,3065080944718534067,580319802844548307,131072 --user-data-dir="C:\Users\justin.
              dearing\AppData\Local\Microsoft\VisualStudio.0_cf8b40b5\WebTools\ChromeUserData_B1BEBFE6_4EE129EE-51D5
              -41C6-9273-B23F70292D3A" --gpu-vendor-id=0x8086 --gpu-device-id=0x193a --gpu-driver-vendor="Intel 
              Corporation" --gpu-driver-version=22.20.16.4749 --gpu-driver-date=7-24-2017 
              --gpu-secondary-vendor-ids=0x102b --gpu-secondary-device-ids=0x0533 --user-data-dir="C:\Users\justin.dear
              ing\AppData\Local\Microsoft\VisualStudio.0_cf8b40b5\WebTools\ChromeUserData_B1BEBFE6_4EE129EE-51D5-41C
              6-9273-B23F70292D3A" --service-request-channel-token=737996187C3544E7EBA58E9ACA801A7B 
              --mojo-platform-channel-handle=1468 --ignored=" --type=renderer " /prefetch:2

ProcessId   : 29440
CommandLine : "C:\Program Files (x86)\Google\Chrome\Application\chrome.exe" --type=renderer 
              --field-trial-handle=1428,3065080944718534067,580319802844548307,131072 
              --service-pipe-token=2E60CA09D9FE788066331C313DD6EA18 --lang=en-US --user-data-dir="C:\Users\justin.deari
              ng\AppData\Local\Microsoft\VisualStudio.0_cf8b40b5\WebTools\ChromeUserData_B1BEBFE6_4EE129EE-51D5-41C6
              -9273-B23F70292D3A" --enable-offline-auto-reload --enable-offline-auto-reload-visible-only --blink-settin
              gs=disallowFetchForDocWrittenScriptsInMainFrame=false,disallowFetchForDocWrittenScriptsInMainFrameOnSlowC
              onnections=true --enable-pinch --device-scale-factor=1 --num-raster-threads=4 
              --enable-main-frame-before-activation --enable-gpu-async-worker-context --content-image-texture-target=0,
              0,3553;0,1,3553;0,2,3553;0,3,3553;0,4,3553;0,5,3553;0,6,3553;0,7,3553;0,8,3553;0,9,3553;0,10,3553;0,11,35
              53;0,12,3553;0,13,3553;0,14,3553;0,15,3553;0,16,3553;0,17,3553;1,0,3553;1,1,3553;1,2,3553;1,3,3553;1,4,35
              53;1,5,3553;1,6,3553;1,7,3553;1,8,3553;1,9,3553;1,10,3553;1,11,3553;1,12,3553;1,13,3553;1,14,3553;1,15,35
              53;1,16,3553;1,17,3553;2,0,3553;2,1,3553;2,2,3553;2,3,3553;2,4,3553;2,5,3553;2,6,3553;2,7,3553;2,8,3553;2
              ,9,3553;2,10,3553;2,11,3553;2,12,3553;2,13,3553;2,14,3553;2,15,3553;2,16,3553;2,17,3553;3,0,3553;3,1,3553
              ;3,2,3553;3,3,3553;3,4,3553;3,5,3553;3,6,3553;3,7,3553;3,8,3553;3,9,3553;3,10,3553;3,11,3553;3,12,3553;3,
              13,3553;3,14,3553;3,15,3553;3,16,3553;3,17,3553;4,0,3553;4,1,3553;4,2,3553;4,3,3553;4,4,3553;4,5,3553;4,6
              ,3553;4,7,3553;4,8,3553;4,9,3553;4,10,3553;4,11,3553;4,12,3553;4,13,3553;4,14,3553;4,15,3553;4,16,3553;4,
              17,3553;5,0,3553;5,1,3553;5,2,3553;5,3,3553;5,4,3553;5,5,3553;5,6,3553;5,7,3553;5,8,3553;5,9,3553;5,10,35
              53;5,11,3553;5,12,3553;5,13,3553;5,14,3553;5,15,3553;5,16,3553;5,17,3553;6,0,3553;6,1,3553;6,2,3553;6,3,3
              553;6,4,3553;6,5,3553;6,6,3553;6,7,3553;6,8,3553;6,9,3553;6,10,3553;6,11,3553;6,12,3553;6,13,3553;6,14,35
              53;6,15,3553;6,16,3553;6,17,3553 --service-request-channel-token=2E60CA09D9FE788066331C313DD6EA18 
              --renderer-client-id=4 --mojo-platform-channel-handle=2724 /prefetch:1

ProcessId   : 15084
CommandLine : "C:\Program Files (x86)\Google\Chrome\Application\chrome.exe" --type=utility 
              --field-trial-handle=1428,3065080944718534067,580319802844548307,131072 --lang=en-US 
              --service-sandbox-type=utility --user-data-dir="C:\Users\justin.dearing\AppData\Local\Microsoft\VisualStu
              dio.0_cf8b40b5\WebTools\ChromeUserData_B1BEBFE6_4EE129EE-51D5-41C6-9273-B23F70292D3A" 
              --service-request-channel-token=3D0651C7E9966DF2088619EA6609F4F0 --mojo-platform-channel-handle=3588 
              --ignored=" --type=renderer " /prefetch:8

ProcessId   : 35200
CommandLine : "C:\Program Files (x86)\Google\Chrome\Application\chrome.exe" --type=renderer 
              --field-trial-handle=1456,10619170367124795314,15493821474693019085,131072 --disable-databases 
              --service-pipe-token=382A3E80A979F18173360DD969037F1D --lang=en-US --enable-offline-auto-reload 
              --enable-offline-auto-reload-visible-only --blink-settings=disallowFetchForDocWrittenScriptsInMainFrame=f
              alse,disallowFetchForDocWrittenScriptsInMainFrameOnSlowConnections=true --enable-pinch 
              --device-scale-factor=1 --num-raster-threads=4 --enable-main-frame-before-activation 
              --enable-gpu-async-worker-context --content-image-texture-target=0,0,3553;0,1,3553;0,2,3553;0,3,3553;0,4,
              3553;0,5,3553;0,6,3553;0,7,3553;0,8,3553;0,9,3553;0,10,3553;0,11,3553;0,12,3553;0,13,3553;0,14,3553;0,15,
              3553;0,16,3553;0,17,3553;1,0,3553;1,1,3553;1,2,3553;1,3,3553;1,4,3553;1,5,3553;1,6,3553;1,7,3553;1,8,3553
              ;1,9,3553;1,10,3553;1,11,3553;1,12,3553;1,13,3553;1,14,3553;1,15,3553;1,16,3553;1,17,3553;2,0,3553;2,1,35
              53;2,2,3553;2,3,3553;2,4,3553;2,5,3553;2,6,3553;2,7,3553;2,8,3553;2,9,3553;2,10,3553;2,11,3553;2,12,3553;
              2,13,3553;2,14,3553;2,15,3553;2,16,3553;2,17,3553;3,0,3553;3,1,3553;3,2,3553;3,3,3553;3,4,3553;3,5,3553;3
              ,6,3553;3,7,3553;3,8,3553;3,9,3553;3,10,3553;3,11,3553;3,12,3553;3,13,3553;3,14,3553;3,15,3553;3,16,3553;
              3,17,3553;4,0,3553;4,1,3553;4,2,3553;4,3,3553;4,4,3553;4,5,3553;4,6,3553;4,7,3553;4,8,3553;4,9,3553;4,10,
              3553;4,11,3553;4,12,3553;4,13,3553;4,14,3553;4,15,3553;4,16,3553;4,17,3553;5,0,3553;5,1,3553;5,2,3553;5,3
              ,3553;5,4,3553;5,5,3553;5,6,3553;5,7,3553;5,8,3553;5,9,3553;5,10,3553;5,11,3553;5,12,3553;5,13,3553;5,14,
              3553;5,15,3553;5,16,3553;5,17,3553;6,0,3553;6,1,3553;6,2,3553;6,3,3553;6,4,3553;6,5,3553;6,6,3553;6,7,355
              3;6,8,3553;6,9,3553;6,10,3553;6,11,3553;6,12,3553;6,13,3553;6,14,3553;6,15,3553;6,16,3553;6,17,3553 
              --service-request-channel-token=382A3E80A979F18173360DD969037F1D --renderer-client-id=25 
              --mojo-platform-channel-handle=7584 /prefetch:1

ProcessId   : 23792
CommandLine : "C:\Program Files (x86)\Google\Chrome\Application\chrome.exe" --type=renderer 
              --field-trial-handle=1456,10619170367124795314,15493821474693019085,131072 --disable-databases 
              --service-pipe-token=156F3EF64699A601618498BF9C88211E --lang=en-US --enable-offline-auto-reload 
              --enable-offline-auto-reload-visible-only --blink-settings=disallowFetchForDocWrittenScriptsInMainFrame=f
              alse,disallowFetchForDocWrittenScriptsInMainFrameOnSlowConnections=true --enable-pinch 
              --device-scale-factor=1 --num-raster-threads=4 --enable-main-frame-before-activation 
              --enable-gpu-async-worker-context --content-image-texture-target=0,0,3553;0,1,3553;0,2,3553;0,3,3553;0,4,
              3553;0,5,3553;0,6,3553;0,7,3553;0,8,3553;0,9,3553;0,10,3553;0,11,3553;0,12,3553;0,13,3553;0,14,3553;0,15,
              3553;0,16,3553;0,17,3553;1,0,3553;1,1,3553;1,2,3553;1,3,3553;1,4,3553;1,5,3553;1,6,3553;1,7,3553;1,8,3553
              ;1,9,3553;1,10,3553;1,11,3553;1,12,3553;1,13,3553;1,14,3553;1,15,3553;1,16,3553;1,17,3553;2,0,3553;2,1,35
              53;2,2,3553;2,3,3553;2,4,3553;2,5,3553;2,6,3553;2,7,3553;2,8,3553;2,9,3553;2,10,3553;2,11,3553;2,12,3553;
              2,13,3553;2,14,3553;2,15,3553;2,16,3553;2,17,3553;3,0,3553;3,1,3553;3,2,3553;3,3,3553;3,4,3553;3,5,3553;3
              ,6,3553;3,7,3553;3,8,3553;3,9,3553;3,10,3553;3,11,3553;3,12,3553;3,13,3553;3,14,3553;3,15,3553;3,16,3553;
              3,17,3553;4,0,3553;4,1,3553;4,2,3553;4,3,3553;4,4,3553;4,5,3553;4,6,3553;4,7,3553;4,8,3553;4,9,3553;4,10,
              3553;4,11,3553;4,12,3553;4,13,3553;4,14,3553;4,15,3553;4,16,3553;4,17,3553;5,0,3553;5,1,3553;5,2,3553;5,3
              ,3553;5,4,3553;5,5,3553;5,6,3553;5,7,3553;5,8,3553;5,9,3553;5,10,3553;5,11,3553;5,12,3553;5,13,3553;5,14,
              3553;5,15,3553;5,16,3553;5,17,3553;6,0,3553;6,1,3553;6,2,3553;6,3,3553;6,4,3553;6,5,3553;6,6,3553;6,7,355
              3;6,8,3553;6,9,3553;6,10,3553;6,11,3553;6,12,3553;6,13,3553;6,14,3553;6,15,3553;6,16,3553;6,17,3553 
              --service-request-channel-token=156F3EF64699A601618498BF9C88211E --renderer-client-id=31 
              --mojo-platform-channel-handle=10212 /prefetch:1

ProcessId   : 20260
CommandLine : "C:\Program Files (x86)\Google\Chrome\Application\chrome.exe" --type=renderer 
              --field-trial-handle=1456,10619170367124795314,15493821474693019085,131072 --disable-databases 
              --service-pipe-token=532ED875E6F370AE47E11790881E9553 --lang=en-US --enable-offline-auto-reload 
              --enable-offline-auto-reload-visible-only --blink-settings=disallowFetchForDocWrittenScriptsInMainFrame=f
              alse,disallowFetchForDocWrittenScriptsInMainFrameOnSlowConnections=true --enable-pinch 
              --device-scale-factor=1 --num-raster-threads=4 --enable-main-frame-before-activation 
              --enable-gpu-async-worker-context --content-image-texture-target=0,0,3553;0,1,3553;0,2,3553;0,3,3553;0,4,
              3553;0,5,3553;0,6,3553;0,7,3553;0,8,3553;0,9,3553;0,10,3553;0,11,3553;0,12,3553;0,13,3553;0,14,3553;0,15,
              3553;0,16,3553;0,17,3553;1,0,3553;1,1,3553;1,2,3553;1,3,3553;1,4,3553;1,5,3553;1,6,3553;1,7,3553;1,8,3553
              ;1,9,3553;1,10,3553;1,11,3553;1,12,3553;1,13,3553;1,14,3553;1,15,3553;1,16,3553;1,17,3553;2,0,3553;2,1,35
              53;2,2,3553;2,3,3553;2,4,3553;2,5,3553;2,6,3553;2,7,3553;2,8,3553;2,9,3553;2,10,3553;2,11,3553;2,12,3553;
              2,13,3553;2,14,3553;2,15,3553;2,16,3553;2,17,3553;3,0,3553;3,1,3553;3,2,3553;3,3,3553;3,4,3553;3,5,3553;3
              ,6,3553;3,7,3553;3,8,3553;3,9,3553;3,10,3553;3,11,3553;3,12,3553;3,13,3553;3,14,3553;3,15,3553;3,16,3553;
              3,17,3553;4,0,3553;4,1,3553;4,2,3553;4,3,3553;4,4,3553;4,5,3553;4,6,3553;4,7,3553;4,8,3553;4,9,3553;4,10,
              3553;4,11,3553;4,12,3553;4,13,3553;4,14,3553;4,15,3553;4,16,3553;4,17,3553;5,0,3553;5,1,3553;5,2,3553;5,3
              ,3553;5,4,3553;5,5,3553;5,6,3553;5,7,3553;5,8,3553;5,9,3553;5,10,3553;5,11,3553;5,12,3553;5,13,3553;5,14,
              3553;5,15,3553;5,16,3553;5,17,3553;6,0,3553;6,1,3553;6,2,3553;6,3,3553;6,4,3553;6,5,3553;6,6,3553;6,7,355
              3;6,8,3553;6,9,3553;6,10,3553;6,11,3553;6,12,3553;6,13,3553;6,14,3553;6,15,3553;6,16,3553;6,17,3553 
              --service-request-channel-token=532ED875E6F370AE47E11790881E9553 --renderer-client-id=32 
              --mojo-platform-channel-handle=9832 /prefetch:1

Existe uma maneira simples de saber o que Pid matar para fechar uma guia anônima? Talvez uma maneira simples de associar url com pid?

    
por Justin Dearing 07.01.2018 / 22:10

1 resposta

1

Há muitas ressalvas, mas você pode fazer isso.

Infelizmente, a linha de comando não é muito esclarecedora quando se trata da URL da guia que ela gerencia. O Chrome tem um gerenciador de tarefas (em "mais ferramentas" no menu), portanto, há claramente um mapeamento das guias para os processos em algum lugar, mas provavelmente ele está dentro de um dos processos do Chrome e não está prontamente acessível. Os novos processos do Google Chrome parecem ter sua configuração por meio de alguma forma de comunicação entre processos . a opção --service-pipe-token , em vez de apenas pela linha de comando.

No entanto, observei um switch que distingue os processos anônimos dos normais: --disable-databases . Tecnicamente "desativa o suporte ao banco de dados HTML5", portanto, se o processo pai receber explicitamente o sinalizador, os processos não-anônimos também o terão, mas, do contrário, ele é realmente adicionado apenas para processos anônimos. Portanto, você pode usar este comando do PowerShell:

gwmi win32_process | ? {$_.Name -eq 'chrome.exe' -and $_.CommandLine.Contains('--disable-databases')} | % {kill -Id $_.ProcessId}

Embora isso realmente interrompa todos os processos de navegação anônima, ele não fecha necessariamente a janela ou as guias anônimas. Quando tentei, todas as guias anônimas se tornaram páginas de erro, mas ficaram por aí. Infelizmente, isso parece ser o melhor que podemos fazer.

    
por 09.01.2018 / 00:50