Useful powershell commands. Will update that list if i find something interesting.
tail -n 10 {filename}
get-content {filename} | select -last 10
gc {filename} | select -last 10
tail -f {filename}
get-content {filename} -wait
gc {filename} -wait
hostname
[System.Net.Dns]::GetHostName()
I hope that powershell has something like 'alias' :)
ReplyDeleteSure. You can type something like this:
ReplyDeleteSet-Alias hostname [System.Net.Dns]::GetHostName()
And use it during the session. Or you can add this line to Microsoft.PowerShell_profile.ps1 in your powershell configuration directory and it will be loaded every time you open powershell. This is analogue of .bashrc in linux.