C# - Create User on Remote Machine in same Workgroup (not domain)

275 Views Asked by At

A windows user can be created on the local machine or in active directory using the .NET System.DirectoryServices.DirectoryEntry class, but I need to create a user on a remote computer which is in the same workgroup.

Is there any way to achieve the following scenario?

  1. The application will run and take administrator credentials from the User
  2. The User's credentials will be used to access the remote computer to create the new user on the remote machine in the same workgroup

Can we achieve the above requirement without using the following methods:

  1. Implementation of Active Directory and creating AD user on remote machine
  2. Creating a utility app, placing it on a shared UNC path and executing this utility remotely on other computers that will create local accounts there

I can't use either of the above methods due to some limitations.

0

There are 0 best solutions below