Skip to content

Instantly share code, notes, and snippets.

Last active January 29, 2019 10:06
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
Star You must be signed in to star a gist
What would you like to do?
Redirect to MIM Portal to make it the Welcome Page in the underlying SharePoint.
Script to Redirect to /IdentityManagement on MIM Portal Server.
Defaults to expecting the only SPSite to be MIM Portal Site.
Intended to be run from SharePoint Management Shell.
Users need Read Access to RootFolder for this to work.
Script gives Read to Authenticated Users by default.
PARAM([string]$MIMWebUrl,[bool]$AddAuthenticatedUsers = $true)
if($MIMWebUrl){ $SPWeb = Get-SPWeb $MIMWebUrl}
else{$SPWeb = (Get-SPSite).RootWeb}
$RootFolder = $SPWeb.RootFolder
$RootFolder.WelcomePage = "IdentityManagement/default.aspx"
#Adding Authenticated Users with Read Access to the SPWeb
$AuthenticatedUsers = New-Object Microsoft.SharePoint.SPRoleAssignment("NT AUTHORITY\Authenticated Users",$null,"Authenticated Users",$null)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment