Tuesday, March 26, 2019

Change External Sharing Settings Across a Hub Site with PowerShell

One of the big Information Architecture changes with modern SharePoint is the flat architecture, which means that now, instead of your Intranet being one Site Collection with multiple subsites, it will now be multiple Site Collections. I’ve seen multiple example architectures where an Intranet can easily become over 15 Site Collections! That means, each Site Collection has its own settings, including external access! While a new SharePoint Admin Center is shipping, you cannot bulk-change External Sharing settings.

So I have built a quick PowerShell script that you can simply provide the URL of a Hub Site and the level of external sharing you want to enable, and it will do the magic for you! The script seen below requires two parameters, and it has some validations in to make sure you supply the right type of values.

  1. HubSiteUrl : The URL of a Hubsite
  2. ExternalSharing : one of the following options:
    1. Disabled – don’t allow sharing outside your organization
    2. ExistingExternalUserSharingOnly – Allow sharing only with the external users that already exist in your organization’s directory
    3. ExternalUserSharingOnly – allow external users who accept sharing invitations and sign in as authenticated users
    4. ExternalUserAndGuestSharing – allow sharing with all external users, and by using anonymous access links.

If you examine the script, you will realize that I run the Get-SPOSite twice , that is because when you run Get-SPOSite without specifying a URL , it doesn’t return the HubSiteId , so that’s why we have to do it!

Download the following script and save it as HubExternal.ps1.

param 
( 
    [Parameter(Mandatory=$true)]
    [string]$HubSiteUrl, 
    [Parameter(Mandatory=$true)][ValidateSet("Disabled","ExistingExternalUserSharingOnly","ExternalUserSharingOnly","ExternalUserAndGuestSharing")]
    [String]$ExternalSharing
)

$HubId = (Get-SPOHubSite -ErrorAction SilentlyContinue | Where {$_.SiteUrl -eq $HubSiteURL}).Id.Guid
if ($HubId -eq $null)
{
        Throw "URL provided is not a valid Hub Site url"
}

$sites = Get-SPOSite -Limit All
foreach ($site in $Sites)
{
        $siteDetails = Get-SPOSite $site.Url
        If ($siteDetails.HubSiteId.Guid -eq $HubId)
                {
                Write-Host "Setting " $site.Url " external sharing permissions to " $ExternalSharing
                Set-SPOSite $siteDetails -SharingCapability $ExternalSharing
                }
}

Here is an example on how to run it:

.\HubExternal.ps1 -HubSiteUrl https://valo365.sharepoint.com/sites/contoso-work -ExternalSharing ExternalUserAndGuestSharing

And this is what it should look like when running it!

External Sharing Settings Across a Hub Site

I hope this helps! You can of course modify this script to take the same logic, and do a bunch of different changes on all the Site Collections in a certain Hub Site!

Leave a comment and don’t forget to like the Absolute SharePoint Blog Page   on Facebook and to follow me on Twitter here  for the latest news and technical articles on SharePoint.  I am also a Pluralsight author, and you can view all the courses I created on my author page.

The post Change External Sharing Settings Across a Hub Site with PowerShell appeared first on Absolute SharePoint Blog by Vlad Catrinescu.


by Vlad Catrinescu via Absolute SharePoint Blog by Vlad Catrinescu

Monday, March 25, 2019

Phishing Attacks Exploit Popularity of Netflix, AMEX

Even companies with the best cybersecurity defenses available can be vulnerable to attack--directly or indirectly.
by Karen D. Schwartz via IT Pro - Microsoft Windows Information, Solutions, Tools

Market Guide for Cloud Office Migration Tools

Mergers and acquisitions, divestitures, and organizations seeking to leverage the benefits of cloud-based collaboration services is driving up the scale and volume of cloud office migrations. We believe, in order to help decision makers ease the tra
by via IT Pro - Microsoft Windows Information, Solutions, Tools

What’s New in SharePoint 2019

SharePoint has been a great collaboration platform, enabling people to easily work together on files, lists and libraries. However, many customers have complained that it wasn’t a good option for their intranet because they weren’t able to easily or
by via IT Pro - Microsoft Windows Information, Solutions, Tools

The Windows Server 2016 and Azure AD Recycle Bins, and Quest Recovery Solutions

Window Server 2008 R2 included a particularly welcome enhancement, Recycle Bin recovery, which enables restore of some recently-deleted objects from Active Directory (AD). To facilitate object recovery in cloud-based environments, Microsoft provides
by via IT Pro - Microsoft Windows Information, Solutions, Tools

EU Said to Urge Member States to Share Intel on 5G Cyber Threats

The new measures are aimed at coordinating a European approach to managing cybersecurity risks, following allegations propelled by the U.S. government that Huawei and other Chinese equipment makers could enable spying by Beijing.
by via IT Pro - Microsoft Windows Information, Solutions, Tools

Meet the Speaker series: Chris Kent

Last December, I was talking to Lyman from the SharePoint Conference organizing team about cool ideas to do before the SharePoint Conference in May! One of the ideas I had that I thought would be awesome is a series of videos with the speakers from the SharePoint Conference that allows everyone from the community to learn a bit more about them, of course focused a bit about SharePoint. As I already interviewed over 20 speakers, it’s very interesting to learn how everyone got into SharePoint, from nuclear engineers, to hardcore developers that now only do no-code solutions! I will release two interviews per week for the next two months (or more if you guys like it!)!

Seventh video in the series is the awesome Chris Kent from Indianapolis!

Chris Kent

Meet Chris Kent

Where to find Chris

You can find Chris on Twitter at https://twitter.com/theChrisKent and his site at https://thechriskent.com/

Are you coming to the SharePoint Conference?

Stay Connected to the Largest SharePoint Conference in the Industry! Register now with the following link and save 50$ by using code VLAD at check out!

https://spvlad.com/SPC2019 

 

The post Meet the Speaker series: Chris Kent appeared first on Absolute SharePoint Blog by Vlad Catrinescu.


by Vlad Catrinescu via Absolute SharePoint Blog by Vlad Catrinescu