New options in the SharePoint Online Management Shell PowerShell cmdlets
A few days ago, Microsoft released a new version of their SharePoint Online Management Shell (the PowerShell cmdlets that can be used to manage SharePoint Online). In this blog post, I will briefly explain what was changed and what you can do now with the new options. Note: The new internal version number for the cmdlets is : 15.0.4569.1506
The first new attribute that is available is for Site Collections and is called SharingCapability. Basically, this attribute tells you if sharing has been enabled for a site collection or not. The three possible values are Disabled, ExternalUserSharingOnly, and ExternalUserAndGuestSharing (see also http://msdn.microsoft.com/en-us/library/microsoft.online.sharepoint.tenantmanagement.sharingcapabilities(v=office.15).aspx)
When you run Get-SPOSite | select Url, SharingCapability you’ll get a list of all site collections and the corresponding Sharing Capability.
You can also set the values, so if you want to enable sharing for a site collection for authenticated users only, run Set-SPOSite -Identity <YourSiteUrl> -SharingCapability ExternalUserSharingOnly:
For tenants, there are three new attributes: DisplayStartASiteOption, SharingCapability, StartASiteFormUrl
You can get the current settings by simply running Get-SPOTenant:
SharingCapability simply shows you which settings have been set for your tenant in general.
DisplayStartASiteOption and StartASiteFormUrl can help you with allowing users to create new site collections, and which form to use. For example, there’s a sample app from Richard diZerega from Microsoft that you could customise for this purpose.
DisplayStartASiteOption controls if the “new site” link is available when you click on Websites in the Ribbon. If it’s deactivated, you don’t get to see such an option:
Turning it on (Set-SPOTenant -DisplayStartASiteOption $true) will provide you with the link:
If you don’t want to use the default form, you can then also specifiy your custom form via Set-SPOTenant -StartASiteFormUrl <FormUrl>.
Please note that these two options are also available through the UI. These two options can be found in the SharePoint Admin Center under Settings:
If DisplayStartASiteOption is set to false, “Hide the link” is activated for Start a Site:
Setting it to true, “Show the link” becomes active:
Lastly, if you set a URL for StartASiteFormUrl, the corresponding field is set:
The last changes in the new version of the cmdlets offer a few new attributes for external users: InvitedBy, WhenCreated, AcceptedAs
When you run Get-SPOExternalUser, you can see who invited the external user, when he accepted, and with which email address:
Additionally, you also have the option to get the external users of a single site collection only, and not the whole tenant, by running Get-SPOExternalUser with the -SiteURL parameter: