Differences between revisions 10 and 14 (spanning 4 versions)
Revision 10 as of 2017-03-23 22:09:37
Size: 846
Editor: SamatJain
Comment:
Revision 14 as of 2019-12-18 21:01:59
Size: 1124
Editor: SamatJain
Comment: which
Deletions are marked like this. Additions are marked like this.
Line 7: Line 7:
# Equivalent of UNIX `which`
(Get-Command which).Path
Line 13: Line 10:

== Equivalent Commands ==

|| '''UNIX ''' || '''!PowerShell ''' ||
|| `rm -rf ${target}` || `Remove-Item -Recurse -Force ${target}` ||
|| `which which` || `(Get-Command which).Path` ||
Line 20: Line 23:

# 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 # Prevent a PowerShell script from quitting so you can read error messages
   5 powershell.exe -File Blah.ps1 -NoExit

Equivalent Commands

UNIX

PowerShell

rm -rf ${target}

Remove-Item -Recurse -Force ${target}

which which

(Get-Command which).Path

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)