-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathManagingSystemProcesses.ps1
More file actions
31 lines (16 loc) · 963 Bytes
/
Copy pathManagingSystemProcesses.ps1
File metadata and controls
31 lines (16 loc) · 963 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
Start-Process calc
Start-Process calc -PassThru
Start-Process -FilePath "C:\Practice\sample.bat"
Get-Process - <#Returns all the processes that are running right now#>
Get-Process -Name chrome
Get-Process -Id 10884
Get-Process -Name Calculator | Select-Object *
Get-Process -Name chrome
Get-Process -Name chrome | Out-GridView
Get-Process -Name chrome | Select-Object * | Out-GridView
Get-Process -Name 'c*' | select -First 1 | select * <# processes that are starting with name c#>
Get-Process -Name 'c*' | Select-Object -Property Name, Company, WorkingSet, Handles, Path
Get-Process -Name 'c*' | Select-Object -Property Name, Company, WorkingSet, Handles, Path | Format-Table -AutoSize
Get-Process -Name 'c*' | Where-Object { $_.Company -like 'Google*'} <#$_ points to the current object or item#>
Get-Process -Name 'c*' | Where-Object { ($_.Company -like 'Google*') -and ($_.Handles -gt 500)} | select *
Get-Process -name chrome | Stop-Process