How to setup the PowerShell environment
This information is for people who have not used PowerShell before, but would like to start using it with the scripts from this site.
Portfolio slicer requires you to have stock/ETF/mutual fund current and historical prices. You can buy this information from different online sources, but we have also prepared scripts that let you download these equity prices from the Yahoo Finance website for free. If you want to get these free stock quotes, your PC needs to be set up to run PowerShell scripts. This is not a complicated task, you will not need to learn this scripting language, but you need to change an execution policy to allow scripts from this website.
If you have never run PowerShell scripts on your PC, as the first step you will have to change the script execution policy. For security reasons PowerShell by default has an execution policy that does not allow to run scripts. Please read this Microsoft post on how to change execution policy. Note: you will need to change PowerShell execution policy just once, before first time you execute any PowerShell script.
Here are step by step instructions on how to change your PowerShell execution policy:
- Click on Windows "Start" button (1). In "Search Windows and Programs" area enter "powershell"(2). You will see a list of programs with "powershell" in their name. Then right mouse click on "Windows PowerShell" (3) and then choose "Run as administrator" (4). This should start new PowerShell window with administrator priviledges that are required for our change.
- Check what is your current PowerShell execution policy by typing in command "Get-ExecutionPolicy". If you never run PoweShell on your machine, result will be "Restricted":
- Set unrestricted execution policy by typing command "Set-ExecutionPolicy unrestricted". Click letter "Y" and then "ENTER" when you will be asked to confirm change:
Please read more about Execution Policy here or bing/google. You should be comfortable with this change.
- Now your computer is configured to run PowerShell scripts. Close current PoweShell window by typing command "Exit".
Note: If you do not have PowerShell, you can download it for free from this Microsoft website.