In Powershell for Virtual Machine Manager..how 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,
Voidy
nvanceaAsked:
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.
0
 
BSonPoshCommented:
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?
0
 
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.
0
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.