Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Scripts blocked Win 7

I have tried several ways to unblock Win7 PowerShell and nothing. Set-ExecutionPolicy Unrestricted this didn't work.

I'm trying to add the information from Yahoo and Google -the error "AppendGeneratedQuotes.ps1 cannot be loaded because the execution of scripts is disabled on this system"
Help

Comments

  • edited May 2016
    For Windows 7, Windows 8, Windows Server 2008 R2 or Windows Server 2012, run the following commands as Administrator:
    x86
    Open C:\Windows\SysWOW64\cmd.exe
    Run the command powershell Set-ExecutionPolicy RemoteSigned

    x64
    Open C:\Windows\system32\cmd.exe
    Run the command powershell Set-ExecutionPolicy RemoteSigned
    ===
    A complete discussion from stackoverflow
  • Hi,

    There was also great suggestion in this forum thread:
    http://support.portfolioslicer.com/index.php?p=/discussion/38/powershell-configuration-for-external-data-files

    Really you might not need to change computer execution policy, all you need is to change .bat files.
    Could you please edit files (right mouse click, then choose edit) as follow:
    File UpdatePSData.bat:
    echo off
    powershell -ExecutionPolicy Bypass .\Scripts\GetQuotesYahoo.ps1
    powershell -ExecutionPolicy Bypass .\Scripts\GetQuotesGoogle.ps1
    powershell -ExecutionPolicy Bypass .\Scripts\GetQuotesGoogleWeb.ps1
    powershell -ExecutionPolicy Bypass .\Scripts\GetExchRatesBoC.ps1
    powershell -ExecutionPolicy Bypass .\Scripts\GetDividendsYahoo.ps1
    powershell -ExecutionPolicy Bypass .\Scripts\GetQuotesAriva.ps1
    powershell -ExecutionPolicy Bypass .\Scripts\GetQuotesYahooIntraday.ps1
    powershell -ExecutionPolicy Bypass .\Scripts\GetExchRatesYahooIntraday.ps1
    powershell -ExecutionPolicy Bypass .\Scripts\ArchiveOldQuotes.ps1
    powershell -ExecutionPolicy Bypass .\Scripts\MakePSDataFiles.ps1
    powershell -ExecutionPolicy Bypass .\Scripts\CreateDatesFile.ps1
    powershell -ExecutionPolicy Bypass .\Scripts\AppendGeneratedQuotes.ps1
    powershell -ExecutionPolicy Bypass .\Scripts\CheckPSFiles.ps1
    choice /C Y /T 10 /D Y /M "Waiting 10sec before closing"
    
    File UpdatePSDataIntraday.bat
    echo off
    powershell -ExecutionPolicy Bypass .\Scripts\GetQuotesYahooIntraday.ps1
    powershell -ExecutionPolicy Bypass .\Scripts\GetExchRatesYahooIntraday.ps1
    powershell -ExecutionPolicy Bypass .\Scripts\CreateDatesFile.ps1
    powershell -ExecutionPolicy Bypass .\Scripts\MakePSDataFiles.ps1
    powershell -ExecutionPolicy Bypass .\Scripts\AppendGeneratedQuotes.ps1
    powershell -ExecutionPolicy Bypass .\Scripts\CheckPSFiles.ps1
    choice /C Y /T 10 /D Y /M "Waiting 10sec before closing"
    Save files after changing and then try to run - it should work without changing your computer settings.
  • Thank you Vidas for the help, but still won't work. I copied and pasted your new file so I don't make a mistake and my powershell is "undefined". I have to change my powershell to unrestricted and it'll partially work with a new error.
  • Made some changes but still got this. And I use Maxim's updated script
  • Hi this error can be fixed by installing updated PowerShell as per this forum thread:
    http://support.portfolioslicer.com/index.php?p=/discussion/6/error-methodnotfound-in-powershell-script#latest
Sign In or Register to comment.