Howdy, Stranger!

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

"Method Invocation failed..." error

I am getting this error as I try to follow the steps outline in the tutorial. Please refer to attachment as well.

---------------------------------------------------------------------------------------------
Method invocation failed because [Selected.System.Management.Automation.PSCustomObject] does not contain a method
named 'Where'.
At D:\Cloud\OneDrive\Athena\My Financial Records\PortfolioSlicer
v3\PortfolioSlicerDDMScriptsV3_20241003\Scripts\psCheckFiles.ps1:309 char:8
+ if($accountList.Where({$_.Account -eq $s.Account}).count -eq 0) {
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : InvalidOperation: (Where:String) [], RuntimeException
+ FullyQualifiedErrorId : MethodNotFound
----------------------------------------------------------------------------------------------

Comments

  • edited November 2024
    I am using Windows 10 and I tried to download the PowerShell 3.0 Framework but it was not applicable to my OS. I have currently installed PowerShell 7.4.6 on my PC
  • I believe there is a bug in the code, when if you have just a single account record, you will get this message.

    Can you please confirm that you have just a single account record? If so, you need to add another account record and try again.
  • Thank you! That fixed it.
Sign In or Register to comment.