Link to home
Start Free TrialLog in
Avatar of bmccleary
bmccleary

asked on

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:
http://learn.iis.net/page.aspx/321/configure-iis-manager-authentication/
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.
ASKER CERTIFIED SOLUTION
Avatar of cj_1969
cj_1969
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of bmccleary
bmccleary

ASKER

Cj,
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?