Method invocation failed op_addition

Question:

in this script i am pulling info from my SQL servers. i create the psobject and then i attempt to += each object into the $results table so that i can get a complete final report.
for some reason if i run the script all the way through it gives me the error

Method invocation failed because [system.management.managementobject] does not contain a method named ‘op_Addition’

But if i run the script line by line I do not get the error.

Answer:

@alroc has a valid point, that’s a lot of code. You can try typing $Result as an [array].

change

to

Source:

Method invocation failed op_addition by licensed under CC BY-SA | With most appropriate answer!

Leave a Reply