POWERSHELL TIPS AND TRICKS | EVERY ADMIN SHOULD KNOW THESE COMMANDS

preview_player
Показать описание
In this video we explain commands that every system administrator should Know if they want to save their terminal output.
PowerShell print to console

# Sample array.
$FruitData = @( [pscustomobject]@{Fruit='Apple';Color='Red'}
[pscustomobject]@{Fruit='Banana'; Color='Yellow'}
[pscustomobject]@{Fruit='Strawberry'; Color='Red'}
[pscustomobject]@{Fruit='Grapes'; Color='Purple'}
[pscustomobject]@{Fruit='Blue Berry'; Color='Blue'}
[pscustomobject]@{Fruit='Water Melon'; Color='Green'}
[pscustomobject]@{Fruit='cantaloupe'; Color='Yellow'}
[pscustomobject]@{Fruit='Papaya'; Color='Yellow'}
)
# Creates a record of all or part of a PowerShell session to a text file.
#####################################################

Start-Transcript $FruitData = @( [pscustomobject]@{Fruit='Apple';Color='Red'}
[pscustomobject]@{Fruit='Banana'; Color='Yellow'}
[pscustomobject]@{Fruit='Strawberry'; Color='Red'}
[pscustomobject]@{Fruit='Grapes'; Color='Purple'}
[pscustomobject]@{Fruit='Blue Berry'; Color='Blue'}
[pscustomobject]@{Fruit='Water Melon'; Color='Green'}
[pscustomobject]@{Fruit='cantaloupe'; Color='Yellow'}
[pscustomobject]@{Fruit='Papaya'; Color='Yellow'}
)
$FruitData
write-hos Stop-Transcript

# sends output to a file.
#####################################################
$FruitData | Out-File 'PATH TO FILE.txt'
$FruitData | Out-File 'PATH TO FILE.log'

# Sends output to an interactive table in a separate window.
####################################################
$FruitData | Out-GridView

# redirects the command output from the command line to the Windows clipboard.
#####################################################
$FruitData | clip

Our Social media handles:
Рекомендации по теме
Комментарии
Автор

Please turn off the music..it's hard to concentrate when the music is on your ears..

onwongjan