Simon
2008-04-04 14:44:37 UTC
Hi,
I'm creating a custom cmdlet that accesses a remtoe system, and
requires a username and password to do so. I would like the cmdlet
(which I am writing in C#) to pick up the username and password of the
currently logged in user, and try these, and if they fail provide a
dialog like the get-credentials cmdlet does.
I have been hunting around though, and can't seem to find a way to get
the password of the current user. I have found a couple ways to get
the username (and domain), but that is it. Has anybody else done
something like this? Any help would be appreciated.
Thanks,
Simon
I'm creating a custom cmdlet that accesses a remtoe system, and
requires a username and password to do so. I would like the cmdlet
(which I am writing in C#) to pick up the username and password of the
currently logged in user, and try these, and if they fail provide a
dialog like the get-credentials cmdlet does.
I have been hunting around though, and can't seem to find a way to get
the password of the current user. I have found a couple ways to get
the username (and domain), but that is it. Has anybody else done
something like this? Any help would be appreciated.
Thanks,
Simon