There are many references on how to do this including this forum post on "Change welcome page of a site collection using PowerShell"
$web = Get-SPWeb <my url>
$rootFolder = $web.RootFolder
$rootFolder.WelcomePage = "<my welcome page>"
$rootFolder.Update()
I tried to shorten it by doing the following
$web.RootFolder.WelcomePage = "<my welcome page>"
$web.RootFolder.Update()
Of course this didn't work because Update() will only work on an instance of RootFolder. It took me a while, but eventually I got it.
No comments:
Post a Comment