Skip to content

Instantly share code, notes, and snippets.

@marcusshepp
Last active February 17, 2022 15:17
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save marcusshepp/e9d065fb43f53b1b0a93e13939222477 to your computer and use it in GitHub Desktop.
Save marcusshepp/e9d065fb43f53b1b0a93e13939222477 to your computer and use it in GitHub Desktop.
Windows Powershell

powershell

Files and Directories

create a new file with new-item

new-item -name 'foobar.txt' -itemtype file -path . -value 'foobarpop'

create a new directory with new-item

new-item -name 'foobar' -itemtype directory -path .

moving items with move-item

move-item -path ~/.gitconfig -destination .

Redirecting Output to File

git diff develop.. > diff.txt

Opening files

vscode

code ./

Profile

Powershell Profile (Bash Profile Equivelant)

~\Documents\WindowsPowerShell\Microsoft.PowerShell_profile.ps1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment