Retrieving Mapped SharePoint Custom Pages from PowerShell

Issue If you’re trying to debug a mapped custom page in SharePoint from PowerShell, but come across this issue: PS C:> $webapp = get-spwebapplication http://sp2010 $webapp.GetMappedPage([Microsoft.SharePoint.Administration.SPWebApplication.SPCustomPage]::Error) Unable to find type [Microsoft.SharePoint.Administration.SPWebApplication.SPCustomPage]: make sure that the assembly containing this type is loaded. At line:2 char:90 + $webapp.GetMappedPage([Microsoft.SharePoint.Administration.SPWebApplication.SPCustomPage] <<<< ::Error) + CategoryInfo : InvalidOperation: (Microsoft.Share...on.SPCustomPage:String) [], RuntimeException + FullyQualifiedErrorId : TypeNotFound Solution Try this instead: $webapp.GetMappedPage([Microsoft.SharePoint.Administration.SPWebApplication+SPCustomPage]::Signout) The Clue I’m not sure why the syntax is different for this. I would have expected […]

 •  0 comments  •  flag
Share on Twitter
Published on May 20, 2013 09:37
No comments have been added yet.


Tom Resing's Collaboration Blog

Thomas Resing
I publish about 2 articles a month to this site and focus on web collaboration topics. If you have an idea for a post topic, please feel free to contact me. You can read more about me. Or Subscribe to ...more
Follow Thomas Resing's blog with rss.