Commandes Powershell
Commandes Powershell
Get-Process
Get-Process | Sort-Object Handles
Get-Process | Sort-Object Handles -Descending
Get-Process | Sort-Object Handles -Descending | Select-Object -First 10
Get-Process | Sort-Object Handles -Descending | Select-Object -First 10 | Group-Object
Company
Get-ExecutionPolicy
Set-ExecutionPolicy RemoteSigned
Get-Process
Get-Process | Get-Member
Get-Process | Get-Member | more
Get-Process | Get-Member -MemberType Property | more
Get-Process | Get-Member -MemberType Properties | more
Get-Process | Get-Member -MemberType Method | more
Get-Date
Get-Date | Get-Member
(Get-Date).Month
(Get-Date).Day
(Get-Date).Ticks
Get-Command
Get-Command -Verb Get
Get-Command -Noun Variable
Get-Command *Object
Get-Process
Get-Process -id 0,4
Get-Process –name lsass,smss
Get-Help Get-Process
Get-Help Get-Process –detailed
Get-Help Get-Process –full
Get-Help Get-Process –examples
Get-Help about_*
Notepad $PSHOME\Examples\profile.ps1
Notepad $HOME\Documents\WindowsPowerShell\profile.ps1
# course 6434A Module 2 Demo 7
[int] $x = 6.626068e-34 # use of [int] here rounds the value to zero.
[double] $h = 6.626068e-34 # Planck's constant
$k = [double] 1.3806504e-23 # Boltzmann's constant
[char] 33 # exclamation
[char] 42 # asterisk
[char] 960 # pi
$fun = "string" # string literal
$numstring = [string] 42 # number as string
$numstring.length
$numstring
$aster = [string] [char] 42 # character in string
$aster.length
$aster