New-Object : Constructor not found. Cannot find an appropriate constructor for type

This one is here so that I don’t forget it in future.

I’ve been writing Powershell again all day today and I spent ages trying to find this error when instantiating a particular object.

Bottom line is that there was a valid constructor that took a single string argument. However, I was passing an empty string to the constructor. Let’s just leave it at “The error message returned is interesting”.

Hope it helps someone else.

Leave a Reply

Your email address will not be published.