Skip to main content

Posts

Showing posts from May, 2019

Enable Folder Creation option in all SharePoint Online Sites using PowerShell

Below is the Powershell script to Enable Folder creation option on Document Library. [System.Reflection.Assembly]::LoadFile("C:\Program Files\Common Files\microsoft shared\Web Server Extensions\16\ISAPI\Microsoft.SharePoint.Client.dll")| Out-Null [System.Reflection.Assembly]::LoadFile("C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\16\ISAPI\Microsoft.SharePoint.Client.Runtime.dll")| Out-Null function Get-SPOAllWeb {    param (    [Parameter(Mandatory=$true,Position=1)] [string]$Username, [Parameter(Mandatory=$true,Position=2)] $AdminPassword,         [Parameter(Mandatory=$true,Position=3)] [string]$Url )   $ctx=New-Object Microsoft.SharePoint.Client.ClientContext($Url)   $ctx.Credentials = New-Object Microsoft.SharePoint.Client.SharePointOnlineCredentials($Username, $AdminPassword)   $ctx.Load($ctx.Web.Webs)   $ctx.Load($ctx.Web)    $lists = $ctx.web.Lists    $list = $lists.GetByTitle("Underwriting")  

Get list of External users from all Site Collections in Office365

Below is the powershell script to iterate through all Site Collections and get list if External users per site collection. $Sites = Get-SPOSite | select * foreach($Site in $Sites)         {                    Write-Host "Getting External Users from " $Site.Url            Get-SPOUser -Site $Site.Url |  Where-Object { $_.LoginName -like "*EXT*"} |ft -AutoSize                    }