BlogPost

Creating a Managed Path, with site and subsite using Powershell

Creating a Managed Path, with site and subsite using PowerShell



Creating a Managed Path, Site and subsite

The requirement pop this week to add a managed path but to start with it took a while for it to be explained to me, can we have teams instead of sites in the address thingy I think was the question!! I have to be honest, when I was asked I was like sure no problem but then when it come to this I had to step back and actually think...

So I opened up SharePoint Management console (as an administrator) and typed help!

 help SPManagegedPath  

This came back with a few examples to get me started...

Now we can create a new managed path

New-SPManagedPath "Teams" -WebApplication "http://YOURSITE" 

now you have the new managed path you can create a team site


Create a site

set a variable

New-SPSite -Url "http://YOURSITE" -OwnerAlias "DOMAIN\SP_ADMIN" -Template $temlate 

Create the site

New-SPSite -Url "http://YOURSITE/TEAMS/SHAREPOINT" -OwnerAlias "DOMAIN\SP_ADMIN" -Template $template

Creating a subsite

If you would like to then add a subsite

New-SPWeb "http://SITE/SUBSITENAME" -Template "STS#0"