November 2018
Intermediate to advanced
566 pages
17h 15m
English
Ensure that the profile is empty. If you just created the profile, you can simply proceed further. If not, clear all contents in the profile. If the error action preference is set in the profile, it will become hard to troubleshoot scripts that you create in the future:
function prompt { $Location = (Get-Location).Path.ToString() switch -Wildcard ($Location) { "/home/$env:USERNAME" { $Location = '~'; break } "/home/$env:USERNAME/Documents" { $Location = 'Documents'; break } "/home/$env:USERNAME/Downloads" { $Location = 'Downloads'; break } "/home/$env:USERNAME/Pictures" { $Location = 'Pictures'; break } "/home/$env:USERNAME/Videos" { $Location = 'Videos'; break } "/home/$env:USERNAME ...
Read now
Unlock full access