How to Connect Share Point Online through Power Shell

How to Connect Share Point Online through Power Shell

#Update and run command to connect

$adminUPN=”adminemailhere”

$orgName=”orgname”

$userCredential = Get-Credential -UserName $adminUPN -Message “Type your password here.”

Connect-SPOService -Url https://$orgName-admin.sharepoint.com -Credential $userCredential

 

 

 

 

The below PowerShell command will set a mandatory 30 DAYS limit on all Anonymous links (or external sharing links) generated from SharePoint Online and OneDrive for Business.

If you do not see the parameter listed for the Set-SPOTenant command, update the SharePoint Online PowerShell to the latest version.

Set-SPOTenant -SharingCapability ExternalUserAndGuestSharing
Set-SPOTenant –RequireAnonymousLinksExpireInDays 30

 

 

 

 

 

 

 

 

 

 

 

 

 

This PowerShell command disable the expiration entirely.

Set-SPOTenant –RequireAnonymousLinksExpireInDays 0

 

 

 

 

Get-SPOTenant
identified your settings:

By |2018-05-28T12:13:36+00:00May 28th, 2018|Uncategorized|0 Comments

Leave A Comment