Apuntes
PS - 1
Contenido del apunte (1)
Página 1
* Start-Transcript
* Get-Command
* Get-Help
* Get-Alias
* Variables
$zebra = Get-Process Notepad
* Get-Member
Method == Action ex. $zebra.kill()
property == وصف ex. $zebra.Name
* Get-History
------------------------------------------------------------------------
Get-PSDrive | ?{$_.Free -gt 1} | %{$Count = 0; Write-Host "";} { $_.Name + ": Used: " + "{0:N2}" -f ($_.Used/1gb) + " Free: " + "{0:N2}" -f ($_.free/1gb) + " Total: " + "{0:N2}" -f (($_.Used/1gb)+($_.Free/1gb)); $Count = $Count + $_.Free;}{Write-Host"";Write-Host "Total Free Space " ("{0:N2}" -f ($Count/1gb)) -backgroundcolor magenta}
? = Where-object -> it used here to filter objects
% = ForEach-object -> it used to itirate by the number of objects
Información
- Descripción
- Apunte sobre PS - 1, creado por mohamed abdullah el 08/07/2021.
- Creado por
- mohamed abdullah
- Visitas
- 0
- Valoración