RE: CredentialAttribute

Tech Tip: Click here to run a free scan for Windows Errors and optimize PC performance



Hello o [MVP],

It's a parameter that takes a
System.Management.Automation.MshCredential
Object,

thanks for the link. it provided me with some cool info.

but let's concentrate on the get-credential cmdlet. Well, i though that the cmdlet would automatically show the dialog to get the credentials from the user. however, by looking at the code through reflector, it looks like the processrecord method tries do get the credential property which is anotated with the credential attribute (and it looks like thisattribute is responsible for getting that info from the user). what i'd like to understand is how does monad use that attribute? for instance, when the cmdlet is executed, how does it uses it? does it look for this attribute on all the properties exposed by a cmdlet? so, if I need to receive a credential on my cmdlet, can i simply annotate that property with the credential attribute?

hope this makes sense...



---
Regards,
Luis Abreu
http://weblogs.pontonetpt.com/luisabreu
mail to: labreu_at_gmail.com


.



Relevant Pages

  • Re: CredentialAttribute
    ... MshCredential object to a parameter. ... but let's concentrate on the get-credential cmdlet. ... the cmdlet would automatically show the dialog to get the credentials from ...
    (microsoft.public.windows.server.scripting)
  • How do I use -Credential parameter?
    ... But when I used those cmdlet with -Credential, ... always got an error (no matter it is Filesystem provider or registry ... MakePath on the 'FileSystem' provider failed for path 'C:\'. ... The provider does not support the use of credentials. ...
    (microsoft.public.windows.server.scripting)