C# code to change Windows Pass
Anonymous
Not applicable
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
14-02-20 09:23 AM
Guys,
Do you have a C# code to change Windows Pass. Must have input as NewPass and OldPass.
Thanks,
Ionut
------------------------------
Cohen
RPA Developer
Romania
------------------------------
Do you have a C# code to change Windows Pass. Must have input as NewPass and OldPass.
Thanks,
Ionut
------------------------------
Cohen
RPA Developer
Romania
------------------------------
4 REPLIES 4
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
14-02-20 12:00 PM
Is there a reason it needs to be C#? Blue Prism's Login Agent VBO already has VB.NET code that does the same thing.
------------------------------
Dave Morris
3Ci @ Southern Company
Atlanta, GA
------------------------------
Dave Morris, 3Ci at Southern Company
------------------------------
Dave Morris
3Ci @ Southern Company
Atlanta, GA
------------------------------
Dave Morris, 3Ci at Southern Company
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
14-02-20 01:08 PM
there is one! I migrate all VB code to C#. And I need this to put all the basic functions into one big object that has all in it. This way I can share one object instead of sharing 20...
Thanks for your answer!
------------------------------
Cohen
RPA Developer
Romania
------------------------------
Thanks for your answer!
------------------------------
Cohen
RPA Developer
Romania
------------------------------
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
14-02-20 01:53 PM
I see. Makes sense. That would be quite a large object. Have you seen any performance issues with doing that? Although, I suppose now that I think about it, an object that contains images for Surface Automation would likely be much larger than an object that just has the various functions/code in it. So I guess there's nothing wrong with doing that except that you'd have a big list in the action drop down. Interesting.
I glanced at the VB.NET code for Change Password and it is fairly simple. It shouldn't be too hard to convert it to C#, but you'll want some classes or whatever might be in the Global Code to go with it as well.
------------------------------
Dave Morris
3Ci @ Southern Company
Atlanta, GA
------------------------------
Dave Morris, 3Ci at Southern Company
I glanced at the VB.NET code for Change Password and it is fairly simple. It shouldn't be too hard to convert it to C#, but you'll want some classes or whatever might be in the Global Code to go with it as well.
------------------------------
Dave Morris
3Ci @ Southern Company
Atlanta, GA
------------------------------
Dave Morris, 3Ci at Southern Company
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
14-02-20 02:09 PM
yeah, this did the trick.
------------------------------
Cohen
RPA Developer
Romania
------------------------------
PrincipalContext pc = new PrincipalContext(ContextType.Domain);
UserPrincipal up = UserPrincipal.FindByIdentity(pc, username);
up.ChangePassword(password, txtNewChangedPassword.Text);
up.Save();
https://stackoverflow.com/questions/31010793/change-password-windows-ad-c-sharp
Thanks to Stack Overflow------------------------------
Cohen
RPA Developer
Romania
------------------------------
