I am in the process of automating the creation of a site collection using PowerShell. Everything works fine but I would like to remove or hide the "Get started with your site" that we see the first time we open a site. Deactivating the Getting started feature will not remove it.
I am trying this using PS so it's easier said than done. What is the name of the getting started feature? For some reason I can't find it when I do get-spfeature for both site and web.
For other readers, here's the full script needed:
# First, get a reference to the target web app: $web = Get-SPWeb "[TargetSiteURL]" # Assuming that 1) the web page file that you want to examine is # the default landing page and 2) Publishing has been activated # for the containing site collection, the following gets you a # reference to the web part manager: $wpm = $web.GetLimitedWebPartManage("pages/default.aspx", [System.Web.UI.WebControls.WebParts.PersonalizationScope]::Shared).WebParts # Note the "pages" in the path. Next, the following lists out # all web parts on this page: $web.GetLimitedWebPartManager("pages/default.aspx",[System.Web.UI.WebControls.WebParts.PersonalizationScope]::Shared).WebParts # Review this list, and then identify the PartOrder of the web # part you want to remove. It its, say, its "5", you get a # reference to web part like so: $wp = $wpm.WebParts # Now delete the web part: $wp.DeleteWebPart # and close the web app reference: $web.Close()
It's easier to remove the web part directly from the page, while it's in edit mode, but then the scripted method also works when automation is needed.
- Edited by Stephan Bren Thursday, March 26, 2015 5:11 PM