Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 924
  • Last Modified:

Script to create IIS 7.0 FTP User with Manager Authentication

I have just finished installing and configuring the new FTP services for IIS 7.0.  The biggest benefit I get from this new version is the capability to provide non-windows based user authentication using the new IIS Manager Authentication.  I have successfully set this functionality up by following the steps provided at the iis.net site below:
So basically, I am allowing users that I create from within IIS (without having to create a Windows account), to login to their specific folder on my server via IIS.  The problem is that for every user that needs to be created (e.g. a user named jdoe), here are the steps I have to perform&
1)      Through Windows Explorer, create a folder under the ftproot\localuser directory named jdoe
2)      Go into IIS Manager, select the server root, double-click on IIS Manager Users and add a new user
3)      Go to the FTP site node, click on IIS Manager Permissions and then add an allow rule for the user that was created.
This works fine, but its very cumbersome and click intensive.  What I want to do is to create a script (probably a PowerShell script), that will automate this process.  Basically, the script would prompt me for a name and password and would then perform steps 1-3 above automatically.  My problem is that I dont know the proper PowerShell commands needed to perform those actions.  Any help on creating the script or pointers to references on these commands would be greatly appreciated.
  • 2
1 Solution
Take a look at this ... http://poshcode.org/685

You could also use AutoIT scripting to create your own script to do this ... http://www.autoitscript.com/autoit3/
bmcclearyAuthor Commented:
Thanks for the information.  The poshcode site is almost perfect.  The only thing I need to change is instead of creating a user through windows, I would like to create the user in the IIS Manager Authentication section.  Do you know where I could fine the references to swap out the code to replace lines 23-44 of the sample code with code to create IIS Manager Users?

Featured Post

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now