Esimese loengu näited: PowerShell

From ICO wiki
Jump to navigationJump to search
The printable version is no longer supported and may have rendering errors. Please update your browser bookmarks and please use the default browser print function instead.
 Id CommandLine                                                                                                       
 -- -----------                                                                                                       
 14 cls                                                                                                               
 15 Get-Process                                                                                                       
 16 ps                                                                                                                
 17 Get-Process |Format-List                                                                                          
 18 Get-Process | ConvertTo-Html                                                                                      
 19 Get-Process | ConvertTo-Html > protsessid.html                                                                    
 20 Get-Process | ConvertTo-csv > protsessid.html                                                                     
 21 Get-Process *ie*                                                                                                  
 22 Get-Process *ie* | get-member                                                                                     
 23 Get-Process *fire*                                                                                                
 24 Get-Process *fire* |kill                                                                                          
 25 $protsessid = Get-Process *fire*                                                                                  
 26 foreach($x in $protsessid){$x.CloseMainWindow()}                                                                  
 27 get-pr                                                                                                            
 28 Get-Process                                                                                                       
 29 Get-Process | Sort-Object ws                                                                                      
 30 Get-Process | Sort-Object ws -des                                                                                 
 31 Get-Process | group name                                                                                          
 32 Get-Process | group name | where ($_.Count -gt 0)                                                                 
 33 (Get-Process | group name) | where ($_.Count -gt 0)                                                               
 34 tmp Get-Process | group name                                                                                      
 35 $tmp = Get-Process | group name                                                                                   
 36 foreach($x in $tmp){$x}                                                                                           
 37 (Get-Process | group name) | sort count                                                                           
 38 (Get-Process | group name) | sort count -des                                                                      
 39 (Get-Process | group name) | sort count -des |select -first 3                                                     
 40 Get-Process *wr*                                                                                                  
 41 Get-Command                                                                                                       
 42 Get-Command *remote*                                                                                              
 43 Get-Command *ws*                                                                                                  
 44 Enable-PSRemoting                                                                                                 
 45 Get-Command *history