Creating local user account c# and .NET 2.0
问题 How can I create a local user account using .NET 2.0 and c# and also be able to set the \"Password never expires\" to never. I have tried using \"Net.exe\" using Process.Start and passing its parameters but it seems that the \"net user\" is unable to set the \"Password never expires\" to never. 回答1: Read this excellent CodeProject article Howto: (Almost) Everything In Active Directory via C# There is a section "Create User Account" and "Dealing with User Passwords". UPDATE: To adapt the code