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".
Function Save-File($config, $fileLocation){
#saves to file
$config.Save($fileLocation)
}
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.
Define the parameter $fileLocation as a string, so which Save overload to call is not ambiguous.
function Save($config,[string]$fileLocation)
{
$config.Save($fileLocation)
}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With