Differences between revisions 1 and 12 (spanning 11 versions)
Revision 1 as of 2016-05-10 23:01:42
Size: 123
Editor: SamatJain
Comment:
Revision 12 as of 2017-04-07 21:30:52
Size: 989
Editor: SamatJain
Comment:
Deletions are marked like this. Additions are marked like this.
Line 1: Line 1:
## page was renamed from CheatSheet/Powershell
Line 5: Line 6:

# Equivalent of UNIX `which`
(Get-Command which).Path

# Prevent a PowerShell script from quitting so you can read error messages
powershell.exe -File Blah.ps1 -NoExit
Line 6: Line 13:

== Choco ==

{{{#!highlight powershell
# These must be done from an admin shell!
# Upgrade all currently installed packages
choco upgrade all -y

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


== External links ==

 * [[https://technet.microsoft.com/en-us/library/bb613488(v=vs.85).aspx|Windows PowerShell Profiles]]: Where is the equivalent of .profile or .bashrc on Windows for PowerShell?

 * https://github.com/Disassembler0/Win10-Initial-Setup-Script: Script to remove stupid defaults and user tracking from Windows 10

   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

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)