I just run scripts on my computer and it worked without any problems. You screenshot shows error in the script GetQuotes-Yahoo.ps1, line 20. And it shows code that created this error, but that code was replaced with new code on 2024-Oct-03. Based on the screenshot above, you need to download latest data management scripts from download page and try running it.
I have been using the latest scripts since they were released. And these errors started happening to me a few weeks ago out of the blue, I did not change anything. I executed the script one day, as usual, and it just happened. The errors in my case show different lines than the OP's.
@Nomperor - at the start of GetQuotes-Yahoo.ps1 script (and most of other scripts) first few lines are:
$scriptPath = Split-Path -parent $MyInvocation.MyCommand.Definition; . ($scriptPath + "\psFunctions.ps1"); # Adding script with reusable functions . ($scriptPath + "\psSetVariables.ps1"); # Adding script to assign values to common variables
First line sets @scriptPath location - folder were you current .ps1 script is located. Second line tries to add script psFunctions.ps1 from the same location as GetQuotes-Yahoo.ps1. So can you please review your folder: c:\Users\javie\OnDrive\PortfolioSlicer\PSDataExtracts\Scripts Do you have scripts psSetVariables.ps1 and psFunctions.ps1 in that folder?
Comments
You screenshot shows error in the script GetQuotes-Yahoo.ps1, line 20. And it shows code that created this error, but that code was replaced with new code on 2024-Oct-03.
Based on the screenshot above, you need to download latest data management scripts from download page and try running it.
I have been using the latest scripts since they were released. And these errors started happening to me a few weeks ago out of the blue, I did not change anything. I executed the script one day, as usual, and it just happened. The errors in my case show different lines than the OP's.
. ($scriptPath + "\psFunctions.ps1"); # Adding script with reusable functions
. ($scriptPath + "\psSetVariables.ps1"); # Adding script to assign values to common variables
First line sets @scriptPath location - folder were you current .ps1 script is located.
Second line tries to add script psFunctions.ps1 from the same location as GetQuotes-Yahoo.ps1.
So can you please review your folder:
c:\Users\javie\OnDrive\PortfolioSlicer\PSDataExtracts\Scripts
Do you have scripts psSetVariables.ps1 and psFunctions.ps1 in that folder?