Howdy, Stranger!

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

Error with UpdatePSData batch file

Hello,

I'm trying to install Portfolio slicer on a new PC but keep getting the below errors:

C:\Users\ivanm\OneDrive\Portfolio Slicer>echo off
Invoke-WebRequest : The response content cannot be parsed because the Internet Explorer engine is not available, or
Internet Explorer's first-launch configuration is not complete. Specify the UseBasicParsing parameter and try again.
At C:\Users\ivanm\OneDrive\Portfolio Slicer\Scripts\GetQuotes-Yahoo.ps1:20 char:17
+ ... $wrCookie = Invoke-WebRequest -Uri $urlCookie -SessionVariable webses ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : NotImplemented: (:) [Invoke-WebRequest], NotSupportedException
+ FullyQualifiedErrorId : WebCmdletIEDomNotSupportedException,Microsoft.PowerShell.Commands.InvokeWebRequestComman
d

You cannot call a method on a null-valued expression.
At C:\Users\ivanm\OneDrive\Portfolio Slicer\Scripts\GetQuotes-Yahoo.ps1:22 char:5
+ $crumbStart = $webCookie.IndexOf($crumbStr); if ($crumbStart -eq ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : InvalidOperation: (:) [], RuntimeException
+ FullyQualifiedErrorId : InvokeMethodOnNull

You cannot call a method on a null-valued expression.
At C:\Users\ivanm\OneDrive\Portfolio Slicer\Scripts\GetQuotes-Yahoo.ps1:23 char:5
+ $crumb = $webCookie.Substring($crumbStart+$crumbStr.Length,100); ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : InvalidOperation: (:) [], RuntimeException
+ FullyQualifiedErrorId : InvokeMethodOnNull

Exception calling "Substring" with "2" argument(s): "Length cannot be less than zero.
Parameter name: length"
At C:\Users\ivanm\OneDrive\Portfolio Slicer\Scripts\GetQuotes-Yahoo.ps1:25 char:5
+ $crumb = $crumb.Substring(0, $crumbEnd); # ================ At ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : NotSpecified: (:) [], MethodInvocationException
+ FullyQualifiedErrorId : ArgumentOutOfRangeException

Invoke-WebRequest : The response content cannot be parsed because the Internet Explorer engine is not available, or
Internet Explorer's first-launch configuration is not complete. Specify the UseBasicParsing parameter and try again.
At C:\Users\ivanm\OneDrive\Portfolio Slicer\Scripts\GetQuotes-Yahoo.ps1:20 char:17
+ ... $wrCookie = Invoke-WebRequest -Uri $urlCookie -SessionVariable webses ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : NotImplemented: (:) [Invoke-WebRequest], NotSupportedException
+ FullyQualifiedErrorId : WebCmdletIEDomNotSupportedException,Microsoft.PowerShell.Commands.InvokeWebRequestComman
d

You cannot call a method on a null-valued expression.
At C:\Users\ivanm\OneDrive\Portfolio Slicer\Scripts\GetQuotes-Yahoo.ps1:22 char:5
+ $crumbStart = $webCookie.IndexOf($crumbStr); if ($crumbStart -eq ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : InvalidOperation: (:) [], RuntimeException
+ FullyQualifiedErrorId : InvokeMethodOnNull

You cannot call a method on a null-valued expression.
At C:\Users\ivanm\OneDrive\Portfolio Slicer\Scripts\GetQuotes-Yahoo.ps1:23 char:5
+ $crumb = $webCookie.Substring($crumbStart+$crumbStr.Length,100); ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : InvalidOperation: (:) [], RuntimeException
+ FullyQualifiedErrorId : InvokeMethodOnNull

Exception calling "Substring" with "2" argument(s): "Length cannot be less than zero.
Parameter name: length"
At C:\Users\ivanm\OneDrive\Portfolio Slicer\Scripts\GetQuotes-Yahoo.ps1:25 char:5
+ $crumb = $crumb.Substring(0, $crumbEnd); # ================ At ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : NotSpecified: (:) [], MethodInvocationException
+ FullyQualifiedErrorId : ArgumentOutOfRangeException

Invoke-WebRequest : The response content cannot be parsed because the Internet Explorer engine is not available, or
Internet Explorer's first-launch configuration is not complete. Specify the UseBasicParsing parameter and try again.
At C:\Users\ivanm\OneDrive\Portfolio Slicer\Scripts\GetQuotes-Yahoo.ps1:20 char:17
+ ... $wrCookie = Invoke-WebRequest -Uri $urlCookie -SessionVariable webses ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : NotImplemented: (:) [Invoke-WebRequest], NotSupportedException
+ FullyQualifiedErrorId : WebCmdletIEDomNotSupportedException,Microsoft.PowerShell.Commands.InvokeWebRequestComman
d

You cannot call a method on a null-valued expression.
At C:\Users\ivanm\OneDrive\Portfolio Slicer\Scripts\GetQuotes-Yahoo.ps1:22 char:5
+ $crumbStart = $webCookie.IndexOf($crumbStr); if ($crumbStart -eq ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : InvalidOperation: (:) [], RuntimeException
+ FullyQualifiedErrorId : InvokeMethodOnNull

You cannot call a method on a null-valued expression.
At C:\Users\ivanm\OneDrive\Portfolio Slicer\Scripts\GetQuotes-Yahoo.ps1:23 char:5
+ $crumb = $webCookie.Substring($crumbStart+$crumbStr.Length,100); ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : InvalidOperation: (:) [], RuntimeException
+ FullyQualifiedErrorId : InvokeMethodOnNull

Exception calling "Substring" with "2" argument(s): "Length cannot be less than zero.
Parameter name: length"
At C:\Users\ivanm\OneDrive\Portfolio Slicer\Scripts\GetQuotes-Yahoo.ps1:25 char:5
+ $crumb = $crumb.Substring(0, $crumbEnd); # ================ At ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : NotSpecified: (:) [], MethodInvocationException
+ FullyQualifiedErrorId : ArgumentOutOfRangeException

Could someone please help me to figure out what the problem may be. I've enabled Windows Powershell so am not sure why this is happening.

Thank you

Comments

  • Your problem is that since this is a new PC, you most likely have not run Internet Explorer for the first time -- the error message says:
    "blah, blah....Internet Explorer's first-launch configuration is not complete."

    Run Internet Explorer, go through the first time run sequence, then you will be all set. FYI, just in case: MS EDGE is not Internet Explorer, you'll have to open the start menu, then start typing "Internet Explorer" and select it when it pops up.
  • Thank you so much! That fixed the problem.
Sign In or Register to comment.