Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

The above line grabs all processes, sorts them by Name then ID and finally exports them to the Desktop as a csv file. The "$env:userprofile" is an environment variable. View Environment Variables to learn more.

Scripting

Execution Policy

The Execution Policy is a safety feature which prevents scripts from running on the machine. The default policy on all new Windows OS's is Restricted which prevents all scripts from running on the machine. 

Set-ExecutionPolicy -ExecutionPolicy Bypass 

The above line allows all scripts to run but it alters the settings for the entire machine. If you want to specify 

Set-ExecutionPolicy -ExecutionPolicy Bypass -Scope CurrentUser