Permissions to Administer SharePoint 2010

I’ve been reading some articles on how to set a user up as a SharePoint Administrator and noticed there is no consensus on which should be the steps to achieve it.

In our environment we follow these steps:

  • Add as local admin to the servers on the farm
  • Add to the farm administrators group
  • Add as powershell admin using the command: add-spshelladmin -username domain\user
  • Add user as DB_OWNER to the Config and to the content databases

See you,

Amadeu.

Advertisements

Set IIS Redirect Settings using Powershell

Hi.

Today I had to change the redirect setting on IIS for a site and before it has been a kind of painful process.

I don’t like doing things manually because it is very error prone and mainly when I’m dealing with Production servers errors are not very welcome.

This powershell script can change these settings for you:

import-module webAdministration

$siteName = "Your Site"
$redirectPage = "http://yourredirectpage.com/destination.aspx"

# Set the redirect
Set-WebConfiguration system.webServer/httpRedirect "IIS:\sites\$siteName" -Value @{enabled="true";destination="$redirectPage";exactDestination="true";httpResponseStatus="Found"}

In order to disable redirect you can use this script:

<pre>import-module webAdministration

$siteName = "Your Site"
$redirectPage = "http://yourredirectpage.com/destination.aspx"

# Disable the redirect
Set-WebConfiguration system.webServer/httpRedirect "IIS:\sites\$siteName" -Value @{enabled="false"}

You can get the script file here.

See you.