Solved

Automate common tasks of new site creation

Posted on 2008-06-18
6
490 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
Netscaler Common Configuration How To guides

If you use NetScaler you will want to see these guides. The NetScaler How To Guides show administrators how to get NetScaler up and configured by providing instructions for common scenarios and some not so common ones.

 
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

Does Powershell have you tied up in knots?

Managing Active Directory does not always have to be complicated.  If you are spending more time trying instead of doing, then it's time to look at something else. For nearly 20 years, AD admins around the world have used one tool for day-to-day AD management: Hyena. Discover why

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

A procedure for exporting installed hotfix details of remote computers using powershell
As tax season makes its return, so does the increase in cyber crime and tax refund phishing that comes with it
This tutorial will give a an overview on how to deploy remote agents in Backup Exec 2012 to new servers. Click on the Backup Exec button in the upper left corner. From here, are global settings for the application such as connecting to a remote Back…
This tutorial will walk an individual through the steps necessary to configure their installation of BackupExec 2012 to use network shared disk space. Verify that the path to the shared storage is valid and that data can be written to that location:…

773 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