Differences between revisions 8 and 13 (spanning 5 versions)
Revision 8 as of 2017-03-23 21:57:43
Size: 798
Editor: SamatJain
Comment:
Revision 13 as of 2019-12-18 00:49:31
Size: 1131
Editor: SamatJain
Comment: Add equivalence table
Deletions are marked like this. Additions are marked like this.
Line 1: Line 1:
## page was renamed from CheatSheet/Powershell
Line 8: Line 9:
}}}
Line 12: Line 12:
}}}

== Equivalent Commands ==

|| '''UNIX ''' || '''!PowerShell ''' ||
|| `rm -rf ${target}` || `Remove-Item -Recurse -Force ${target}` ||
Line 19: Line 25:

# Useful packages for development/not pulling hair out
choco install -y cmake.portable python2 python3 7zip git visualstudiocode cmdermini

   1 # Print current environment (i.e. export)
   2 Get-ChildItem Env:
   3 
   4 # Equivalent of UNIX `which`
   5 (Get-Command which).Path
   6 
   7 # Prevent a PowerShell script from quitting so you can read error messages
   8 powershell.exe -File Blah.ps1 -NoExit

Equivalent Commands

UNIX

PowerShell

rm -rf ${target}

Remove-Item -Recurse -Force ${target}

Choco

   1 # These must be done from an admin shell!
   2 # Upgrade all currently installed packages
   3 choco upgrade all -y
   4 
   5 # Useful packages for development/not pulling hair out
   6 choco install -y cmake.portable python2 python3 7zip git visualstudiocode cmdermini


CategoryCheatSheet

SamatsWiki: CheatSheet/PowerShell (last edited 2019-12-18 21:01:59 by SamatJain)