To set a custom access denied page, we use SharePoint PowerShell Cmdlet and the following snippet set the custom access denied page and uses Get-SPCUstomLayoutsPage to verify the custom page.
$web = Get-SPWebApplication http://SharePoint:3000/
Here are list of custom pages you can set -
To learn more about the cmdlet and available options, check this URL - http://technet.microsoft.com/en-us/library/ff607768(v=office.14).aspx
Note: the example given in the above Technet microsoft link has a bug, see the highlight in the below screenshot from the site*.
Identity Type must be one of the following, and not like the url given on the technet example:
*Source - http://technet.microsoft.com/en-us/library/ff607768(v=office.14).aspx
$web = Get-SPWebApplication http://SharePoint:3000/
Set-SPCustomLayoutsPage -Identity AccessDenied –RelativePath "/_layouts/CustomPages/CustomAccessDenied.aspx" -WebApplication $web
$web = Get-SPWebApplication http://SharePoint:3000/
Get-SPCustomLayoutsPage -Identity AccessDenied -WebApplication $web | Format-List - AccessDenied
- Confirmation
- Error
- Login
- RequestAccess
- Signout
- WebDeleted
To learn more about the cmdlet and available options, check this URL - http://technet.microsoft.com/en-us/library/ff607768(v=office.14).aspx
Note: the example given in the above Technet microsoft link has a bug, see the highlight in the below screenshot from the site*.
Identity Type must be one of the following, and not like the url given on the technet example:
- None
- AccessDenied
- Confirmation
- Error
- Login
- RequestAccess
- Signout
- WebDeleted
*Source - http://technet.microsoft.com/en-us/library/ff607768(v=office.14).aspx
Comments
Post a Comment