get-random
get-itemproperty NTUSER.DAT | format-list *
PS C:\Users\bob> find-module -Tag Telegram
Version Name Repository Description
------- ---- ---------- -----------
1.12.0 PoshGram PSGallery PoshGram provides functionality to send various ...
get-process | sort-object id
get-process notepad++ | stop-process
get-service
PS C:\Users\bob> 1,2,3 | foreach-object {$_}
1
2
3
get-process | select-object name,id,cpu
PS C:\Users\bob> get-process | where-object {$_.cpu -gt 50}
Handles NPM(K) PM(K) WS(K) CPU(s) Id SI ProcessName
------- ------ ----- ----- ------ -- -- -----------
293 18 6916 8924 76.50 6488 14 chrome
324 27 148200 197684 80.23 6868 14 chrome
1515 47 326308 160516 2,692.55 7512 14 chrome
432 22 23992 30612 481.83 7724 14 chrome
1513 65 283372 283576 454.69 7760 14 chrome
3252 180 97884 97396 88.55 12240 14 explorer
957 75 32656 23648 152.98 5780 14 YoudaoDict
get-childitem -path $home -recurse | where-object {$_.length -gt 20mb}
look for files in home and sub directories that is bigger than 20mb
get-childitem -path $home -recurse | where-object {$_.length -gt 20mb} | measure-object
count # of files
get-process | stop-process -whatif
find out which process will be stopped
reference:
https://www.youtube.com/watch?v=QKmyf6c83Rs
No comments:
Post a Comment