Adding the FPSE software is relatively easy. IIS.Net has great information about this process. Warning: logon as the Administrator and perform all duties as the Administrator, no matter what your user permissions are. UAC creates unusual and unexpected results if you don't run as Administrator -- especially if running from the PowerShell or Command line. Another note, ASP from IIS 5.0 uses .Net 2.0 and IIS 7.x uses .Net 3.0 (integrated).
FPSE comes with a powerful command line executable you may want to use if you have several websites, subwebs, and/or users and permissions to populate. Combined with PowerShell, you can create some simple CSV files, input your information, and build your web environment without having to the use SharePoint Designer GUI in a painstakingly slow building process.
Using IIS, create a parent website that will host the subwebs. Assign it's IP, port, etc. Use the SharePoint Admin web interface to extend the website with FPSE. Once created and extended, click on IIS/Sites locate your new websites ID number. That will be important for the scripts.
Creating subwebs using PowerShell and OWSADM:
The FPSE executable OWSADM.EXE is located in "%systemdrive%\program files (x86)\common files\microsoft shared\Web Server Extensions\50\bin". Open a cmd.exe window and CD your way to the owsadm.exe location. This is the syntax for creating a subweb:
owsadm.exe -o create -w /Subwebname -m YourParentSiteID -u InitialSubwebAdmn -pw (don't have to use)
Example:
owsadm -o create -w /TestSubWeb -m 4 -u Administrator -pw MyPa$$w0rd
Once your subsite is created, you can add users and roles. To do so, follow this syntax:
owsadm -o roleusers -w /Subwebname -c add -u user1,user2,user3 -n Browser -m YourParentSideID
Example:
owsadm -o roleusers -w /TestSubWeb -c add -u Bob,Tom,Wilma -n Browser -m 4
(no spaces between users and commas and for Advanced author use Advauthor)
If you have several websites, subsites, and users, it might be worth your while to create CSV files to import into a couple of PowerShell scripts. PowerShell is powerful and requires you to run it as Administrator. Also, you have to turn on scripting for PS via the "set-executionpolicy Unrestricted." Default is Restricted. I mention how to change it in a previous blog post.
Create a CSV for your Subwebs:
ParentWeb,Subweb,Admin,Password
4,2014,dbadmin,password
4,TestSubweb,Admin,password
Save this file as Subwebs.csv in the same folder as you'll run your PowerShell script from (I suggest from the owsadm.exe folder)
Create a PowerShell script:
import-csv Subwebs.csv|foreach {
$parent = $_.ParentWeb
$subweb = $_.Subweb
$admin = $_.Admin
$password = $_.Password
.\owsadm.exe -o create -w /$subweb -m $parent -u $admin
}
In this script I left out the password portion as the user accounts were already created and I ddn't want to jeopardize them. You can add and use -pw and input the data from column four of the Subwebs.csv, just remember to add -pw $password to the owsadm line.
Once the subwebs are created, you can work on inputting your users and their subweb roles. Create Webperms.csv and add users and roles:
Subweb,User,Perm
2014,brad,Browser
2014,anslo,advauthor
Save to the owsadm.exe folder then create a PowerShell script:
import-csv Webperms.csv|foreach {
$perm = $_.Perm
$user = $_.User
$subweb = $_.Subweb
.\owsadm.exe -o roleusers -w /$subweb -c add -u $user -n $perm -m 4
}
Please leave comments if this article helped you or you need more information. I wrote it with the assumption that you are well-versed in server administration and some scripting knowledge. Enjoy!
References:
http://technet.microsoft.com/en-us/library/cc768032.aspx
http://support.microsoft.com/kb/272945
http://support.microsoft.com/kb/838684
http://learn.iis.net/page.aspx/134/installing-the-frontpage-server-extensions-on-iis-7/
No comments:
Post a Comment