Getting past an error Multiple ambiguous overloads found for “Save”

Question:

I am trying to save an xml object using the save method. I receive the error:

Multiple ambiguous overloads found for “Save” and the argument count:
“1”.

I know that by running only one save the program runs without error. So I believe the multiple calls of the method are causing the issue but I am not familiar with argument.

What can I do to placate the Powershell console, it was running in Powershell ISE but I am not sure where to look now.

Thanks for the read. Please let me know if you have any questions and I will do my best to provide the correct info.

Answer:

Define the parameter $fileLocation as a string, so which Save overload to call is not ambiguous.

Source:

Getting past an error Multiple ambiguous overloads found for “Save” by licensed under CC BY-SA | With most appropriate answer!

Leave a Reply