[Last Call] Learn about multicloud storage options and how to improve your company's cloud strategy. Register Now

x
?
Solved

Automate common tasks of new site creation

Posted on 2008-06-18
6
Medium Priority
?
502 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 900 total points
ID: 21818070
0
 
LVL 37

Assisted Solution

by:meverest
meverest earned 600 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
Creating Active Directory Users from a Text File

If your organization has a need to mass-create AD user accounts, watch this video to see how its done without the need for scripting or other unnecessary complexities.

 
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

 [eBook] Windows Nano Server

Download this FREE eBook and learn all you need to get started with Windows Nano Server, including deployment options, remote management
and troubleshooting tips and tricks

Question has a verified solution.

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

Restoring deleted objects in Active Directory has been a standard feature in Active Directory for many years, yet some admins may not know what is available.
I was prompted to write this article after the recent World-Wide Ransomware outbreak. For years now, System Administrators around the world have used the excuse of "Waiting a Bit" before applying Security Patch Updates. This type of reasoning to me …
This tutorial will walk an individual through locating and launching the BEUtility application and how to execute it on the appropriate database. Log onto the server running the Backup Exec database. In a larger environment, this would generally be …
This tutorial will walk an individual through setting the global and backup job media overwrite and protection periods in Backup Exec 2012. Log onto the Backup Exec Central Administration Server. Examine the services. If all or most of them are stop…

650 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