How to run c# application with admin creds?

后端 未结 7 792
旧时难觅i
旧时难觅i 2020-12-19 08:03

I wrote a C# application that unlocks users when they are locked out of their account (Active Directory). The application searches for users in a specific OU and will list t

7条回答
  •  太阳男子
    2020-12-19 08:40

    Looks like you want to impersonate the admin user. Here's an article and demo. Looks to be written in .Net 1 but should get you started. Also check out the WindowsIdentity class.

提交回复
热议问题