PowerShell commands tips

  1. set environment variables

$env:ENV=”STAGE”

2. How to print the log both in console as well as writing it to file.

Using Tee
C:\ipconfig | tee C:\log.txt

3. open powershell at a specific folder.

on File Explorer, navigate to the folder you want to open the powershell terminal, enter “powershell” or “cmd” in the File Explorer address bar.

Leave a comment