Solved

Automate common tasks of new site creation

Posted on 2008-06-18
6
481 Views
Last Modified: 2012-05-05
I'd like some assistance creating a batch file (or possibly powershell, but I haven't looked into that enough yet) that will automate some common tasks that I perform when I create a new website (the site name will be passed as an argument)  The tasks are as follows (assuming domain name is example.com):

- Create username that is the sitename minus the TLD (example.com becomes example)
- Add this user to the group "Web Site Managers"
- Create directory C:\Sites\example.com with two folders, logs & www
- Add 2 sites, one for example.com and one for www.example.com
- Set example.com home directory to C:\Sites\example.com and set HTTP Redirect (301) to www.example.com
- Set home directory for www.example.com to C:\Sites\example.com\www
- Set logging directory for both sites to be C:\Sites\example.com\logs
- Set .NET user [Network Service] to have full permissions on C:\Sites\example.com\www
- Create FTP virtual directory for the user (directory name equals user name) under the DefaultFTPSite with the FTP login directory being C:\Sites\example.com

If someone could also provide resources (lilnks, books, etc) on documentation that will help me achieve all of this, I would be as willing to award points as if they had written the script for me myself.  This is a learning experience for me.  Thanks in advance for all your help.
0
Comment
Question by:eohns
  • 3
  • 2
6 Comments
 
LVL 18

Accepted Solution

by:
BSonPosh earned 300 total points
ID: 21818070
0
 
LVL 37

Assisted Solution

by:meverest
meverest earned 200 total points
ID: 21818092
IIS7 also ships with "AppCmd.exe" that can be used to script most tasks related to web site set up and administration.

Cheers.
0
 

Author Comment

by:eohns
ID: 21824846
Thank you guys for your help, but do you have any resources regarding the FTP aspect?
0
How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

 
LVL 18

Expert Comment

by:BSonPosh
ID: 21824876
In Powershell you can create the folders using New-Item and add the ACLs via Set-ACL. You would have to create the FTP site via the IIS 7 Powershell CMDLets or WMI
0
 

Author Comment

by:eohns
ID: 21920214
I want to thank everyone for their help.  I'm going to close this question because I don't think I'll be getting any more replies, but I will split the points between the 3 of you.  Thanks again for all your help.
0
 

Author Closing Comment

by:eohns
ID: 31468608
I split the points giving the Expert who responded twice and with links the most.
0

Featured Post

IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

If you migrate a Terminal Server licenses server inside the 2008 server family, you can takte advantage of the build-in migration tool. If you like to migrate an older 2003 Server (and the installed client CALs) to a 2008 R2 server for example, you …
I was supporting a handful of Windows 2008 (non-R2) 2 node clusters with shared quorum disks. Some had SQL 2008 installed and some were just a vendor application that we supported. For the purposes of this article it doesn’t really matter which so w…
To efficiently enable the rotation of USB drives for backups, storage pools need to be created. This way no matter which USB drive is installed, the backups will successfully write without any administrative intervention. Multiple USB devices need t…
This tutorial will show how to configure a single USB drive with a separate folder for each day of the week. This will allow each of the backups to be kept separate preventing the previous day’s backup from being overwritten. The USB drive must be s…

744 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now