Getting started with PowerShell Profiles HD
In this video, we look at how to solve the most common complaint I get about my videos using a PowerShell Profile. With Profiles, you can have cmdlets like Start-Transcript run everytime you open a new session. Pretty cool stuff that is easy to implement once I show you the basics. Cmdlets we cover: * Get_PSReadLineOption * $profile * test-path * New-Item Video on installing PSReadLine https://www.youtube.com/watch?v=3jAH92mBbRk #Color Function Script function Show-Colors( ) { $colors = [Enum]::GetValues( [ConsoleColor] ) $max = ($colors | foreach { "$_ ".Length } | Measure-Object -Maximum).Maximum foreach( $color in $colors ) { Write-Host (" {0,2} {1,$max} " -f [int]$color,$color) -NoNewline Write-Host "$color" -Foreground $color } } #Everything in my profile Start-Transcript | Out-Null Set-PSReadlineOption -TokenKind String -ForegroundColor Yellow IF (([Security.Principal.WindowsPrincipal] `
Похожие видео
Показать еще