In Powershell for Virtual Machine can I test that a credential object that I created is valid?

I have a credential object that I created  in Powershell called $credential.
How can I validate that this credential can authenticate to the VMM server?
Thx a bunch,
Who is Participating?
BSonPoshConnect With a Mentor Commented:
Not sure what the point of  "validate-credentials"  would be. You can effectively do the same thing by "trapping" the failure.

It seems like un-needed network traffic.
Just try it?

I am not sure exactly what you mean. I assume you mean you want to validate the credentials BEFORE you pass them to the VMM Server. If that is the case I am not certain you can do that. Why not just try them and catch the failure scenario?
nvanceaAuthor Commented:
The only way to try it is by  sending  a command to VMM that requires credentials . I thought that might be a method like "validate-credentials" that can do that.
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.