Office 365 Como obtener la opción de compartir información de cada colección de sitios de SPO (II)!

Siguiendo con la serie de artículos sobre como obtener la opción de compartir configurada en cada Colección de Sitios en un tenant de SharePoint Online (SPO), en esta ocasión os comparto como obtener dicha información por medio de PowerShell y el script que podéis descargaros desde:https://gallery.technet.microsoft.com/How-to-get-sharing-status-d28b8523

function Get-SPOSharingStatus_SPO_Site_Collections
{
    param ($sSPOSharingCapability)
    try
    {   
        Write-Host "Getting al SPO Site Collections with Sharing Status equals to $sSPOSharingCapability" -ForegroundColor Green
        switch ($sSPOSharingCapability) 
        { 
        "Disabled" {
                Get-SPOSite |Where-Object {$_.SharingCapability -eq $sSPOSharingCapability}|select Url,SharingCapability
            }
        "Enabled"{
                Get-SPOSite |Where-Object {$_.SharingCapability -ne "Disabled"}|select Url,SharingCapability
            }
        "ExternalUserSharingOnly"{            
            Get-SPOSite |Where-Object {$_.SharingCapability -eq $sSPOSharingCapability}|select Url,SharingCapability
            }
        "ExternalUserAndGuestSharing"{
            Get-SPOSite |Where-Object {$_.SharingCapability -eq $sSPOSharingCapability}|select Url,SharingCapability
            }
        default{
            Write-Host "Requested operation is not valid" -ForegroundColor Red
            }           
        }    

    }
    catch [System.Exception]
    {
        Write-Host -Foregroundcolor Red $_.Exception.ToString()   
    }    
}

#Connection to Office 365
$sUserName="<O365User>@<O365Domain>.onmicrosoft.com"
$sSPOAdminCenterUrl="https://<O365Domain>-admin.sharepoint.com/"
$sPassword="<O365Password>"
$sSecurePassword=ConvertTo-SecureString "" -asplaintext -force
$msolcred=New-Object -TypeName System.Management.Automation.PSCredential -ArgumentList $sUserName, $sSecurePassword
Connect-SPOService -Url $sSPOAdminCenterUrl -Credential $msolcred

#Sharing Capability Disabled
$sSPOSharingCapability="Disabled"        
#Get-SPOSharingStatus_SPO_Site_Collections -sSPOSharingCapability $sSPOSharingCapability

#Sharing Capability Enabled -> Two options: Enabled with external users & Enabled with external users + Guest links
$sSPOSharingCapability="Enabled"        
#Get-SPOSharingStatus_SPO_Site_Collections -sSPOSharingCapability $sSPOSharingCapability

#Sharing Capability Enabled -> Enabled with external users
$sSPOSharingCapability="ExternalUserSharingOnly"        
#Get-SPOSharingStatus_SPO_Site_Collections -sSPOSharingCapability $sSPOSharingCapability

#Sharing Capability Enabled -> Enabled with external users and Guest links
$sSPOSharingCapability="ExternalUserAndGuestSharing"        
#Get-SPOSharingStatus_SPO_Site_Collections -sSPOSharingCapability $sSPOSharingCapability

Office 365: How to get the list of Add-ins installed on a SPO Site (II)!

In the previous post I showed you how to get the list of Add-ins installed on a SharePoint Online (SPO) site using the user interface. In this post you can find the programatic approach by means of PowerShell. You can download the PowerShell script from the following Url: How to get the Add-ins installed on a SPO Site

function Get-InstalledAddInsOnSPOSite
{
    param ($sSiteUrl,$sUserName,$sPassword,$sCSOMPath)
    try
    { 
        Write-Host "----------------------------------------------------------------------------"  -ForegroundColor Green
        Write-Host "Getting all the Add-ins installed on the site $sSiteUrl" -ForegroundColor Green
        Write-Host "----------------------------------------------------------------------------"  -ForegroundColor Green
     
        #Adding the Client OM Assemblies        
        $sCSOMRuntimePath=$sCSOMPath +  "\Microsoft.SharePoint.Client.Runtime.dll"        
        $sCSOMPath=$sCSOMPath +  "\Microsoft.SharePoint.Client.dll"
                     
        Add-Type -Path $sCSOMPath         
        Add-Type -Path $sCSOMRuntimePath        

        #SPO Client Object Model Context
        $spoCtx = New-Object Microsoft.SharePoint.Client.ClientContext($sSiteUrl) 
        $spoCredentials = New-Object Microsoft.SharePoint.Client.SharePointOnlineCredentials($sUserName, $sPassword)  
        $spoCtx.Credentials = $spoCredentials 
  
        #Add-ins installed on the site
        $spoInstalledAddins=[Microsoft.SharePoint.Client.AppCatalog]::GetAppInstances($spoCtx,$spoCtx.Web)        
        $spoCtx.Load($spoInstalledAddins)
        $spoCtx.ExecuteQuery()
        foreach($spoInstalledAddin in $spoInstalledAddins){
            Write-Host "Add-in Name:" $spoInstalledAddin.Title "- Add-in Status:" $spoInstalledAddin.Status
        }
        $spoCtx.Dispose()
    }
    catch [System.Exception]
    {
        Write-Host -ForegroundColor Red $_.Exception.ToString()   
    }    
}

#Required Parameters
$sSiteUrl = "https://<O365_Domain>.sharepoint.com/sites/<SPOSite>/" 
$sUserName = "<O365User>@<O365_Domain>.onmicrosoft.com" 
#$sPassword = Read-Host -Prompt "Enter your password: " -AsSecureString  
$sPassword= ConvertTo-SecureString "<User_Password>" -AsPlainText -Force
$sCSOMPath="<CSOM_Path>"

Get-InstalledAddInsOnSPOSite -sSiteUrl $sSiteUrl -sUserName $sUserName -sPassword $sPassword -sCSOMPath $sCSOMPath