Is there a way to add new users to IIS remotely? I want to create new users from another web site located on another server so that I can log on to the server with these accounts to add and edit (new) web sites. Ideally I want to do this without adding a 3rd party software into the equation. As far as I can see AppCmd.exe does not have any functions to create (guest) users, so I am guessing this has to be done at a higher hierarchical level. Any good clues where to begin this search?
1 Answers
The built-in authentication mechanisms in IIS back-end into the Windows operating system's Security and Accounts Manager (SAM). On an IIS server that isn't a member of an Active Directory domain you would be looking to create local user accounts. If your IIS server is a member of a domain you can still create local user accounts, but you might want domain user accounts if you have multiple servers that you might want these users to access using the same username / password.
There are a variety of APIs and mechanisms that you can use to create local and domain user accounts. The old standby NET USER
command (provided by the old NET.EXE
program) is a favorite of mine, personally. You can add a user "Bob" with the password "P@ssw0rd" with the command: net user Bob P@ssw0rd /add
It's not "high tech" but it's effective.
![](../../users/profiles/7200.webp)
- 141,071
- 19
- 191
- 328