Solved

Automate common tasks of new site creation

Posted on 2008-06-18
6
498 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
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

Three Reasons Why Backup is Strategic

Backup is strategic to your business because your data is strategic to your business. Without backup, your business will fail. This white paper explains why it is vital for you to design and immediately execute a backup strategy to protect 100 percent of your data.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
cannot create VHD from hyperv server 2008 r2  on server 2012 r2 share 3 52
GPO on certain users 17 38
AD Account lockout 11 69
Change local account password via GPO? 34 72
Background Information Recently I have fixed file server permission issues for one of my client. The client has 1800 users and one Windows Server 2008 R2 domain joined file server with 12 TB of data, 250+ shared folders and the folder structure i…
As tax season makes its return, so does the increase in cyber crime and tax refund phishing that comes with it
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 walk an individual through configuring a drive on a Windows Server 2008 to perform shadow copies in order to quickly recover deleted files and folders. Click on Start and then select Computer to view the available drives on the se…

726 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