Office 365: How to add Project Online to an existing site collection in SPO!

If you need to add Project Online features to an existing site collection in SharePoint Online (SPO), you only need to follow the step by step process described in the following Office 365 support article:

https://support.office.com/en-us/article/Add-Project-Online-to-a-site-collection-8accac79-9dc8-4167-8e0c-2c20fabcebdd?ui=en-US&rs=en-US&ad=US

Office 365: Como añadir Project Online a una Colección de Sitios existente en SPO!

Si necesitáis añadir las características y capacidades de Project Online a una Colección de Sitios existente de SharePoint Online (SPO), no tenéis más que seguir el paso a paso indicado en el siguiente artículo de soporte de Office 365:

https://support.office.com/en-us/article/Add-Project-Online-to-a-site-collection-8accac79-9dc8-4167-8e0c-2c20fabcebdd?ui=en-US&rs=en-US&ad=US

Office 365: How to disable files synchronization in SPO Doc. Libraries (II)!

In my previous post about how to disable file synchronization in SPO Doc. Libraries, I introduced you the UI approach. This time I’m sharing how to get the same result by using PowerShell and the Client Side Object Model (CSOM) for SharePoint Online (SPO). Bear in mind that you need at least the August 2016 version of the CSOM for SPO in order to be able to enable/disable sync option for a doc. library using CSOM. You can download the script from the following Url: How to enable/disable sync option in a SPO Doc. Library

############################################################################################################################################
# Script that allows to enable / disable syncrhonization option in a SharePoint Document Library
# Required Parameters:
#  -> $sUserName: User Name to connect to the SharePoint Online Site.
#  -> $sPassword: Password for the user.
#  -> $sSiteUrl: SharePoint Online Site.
#  -> $sDocLibraryName: Name of the Document Library.
#  -> $sOperationType: Operation to be done (Enable / Disable).
############################################################################################################################################

$host.Runspace.ThreadOptions = "ReuseThread"

#Definition of the function that allows to enable/disable syncrhonization option in a SharePoint Document Library
function EnableDisable-SyncSPODocLibrary
{
    param ($sSiteUrl,$sUserName,$sPassword,$sCSOMPath,$sDocLibraryName,$sOperationType)
    try
    { 
        #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 
  
        $spoList = $spoCtx.Web.Lists.GetByTitle($sDocLibraryName)
        $spoCtx.Load($spoList)
        $spoCtx.ExecuteQuery()

        #Operation Type
        switch ($sOperationType) 
        { 
        "Enable" {
            Write-Host "Enabling syncrhonization for document library $sDocLibraryName" -ForegroundColor Green
            $spoList.ExcludeFromOfflineClient=$false
            }
        "Disable"{
            Write-Host "Disabling syncrhonization for document library $sDocLibraryName" -ForegroundColor Green
            $spoList.ExcludeFromOfflineClient=$true
            }
        default{
            Write-Host "Requested operation is not valid" -ForegroundColor Red
            }           
        }        
        $spoList.Update()
        $spoCtx.ExecuteQuery()
        $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>"
$sDocLibraryName="<Doc_Library_Name>"
$sOperationType="Enable"
EnableDisable-SyncSPODocLibrary -sSiteUrl $sSiteUrl -sUserName $sUserName -sPassword $sPassword -sCSOMPath $sCSOMPath -sDocLibraryName $sDocLibraryName -sOperationType $sOperationType

Office 365: Como deshabilitar la sincronización de bibliotecas de SPO (II)!

Siguiendo con la serie de artículos sobre como deshabilitar la sincronización de bibliotecas de SharePoint Online (SPO), en esta ocasión os comparto la aproximación programática mediante el correspondiente script PowerShell que podéis descargaros desde el siguiente enlace: How to enable/disable sync option in a SPO Doc. Library

############################################################################################################################################
# Script that allows to enable / disable syncrhonization option in a SharePoint Document Library
# Required Parameters:
#  -> $sUserName: User Name to connect to the SharePoint Online Site.
#  -> $sPassword: Password for the user.
#  -> $sSiteUrl: SharePoint Online Site.
#  -> $sDocLibraryName: Name of the Document Library.
#  -> $sOperationType: Operation to be done (Enable / Disable).
############################################################################################################################################

$host.Runspace.ThreadOptions = "ReuseThread"

#Definition of the function that allows to enable/disable syncrhonization option in a SharePoint Document Library
function EnableDisable-SyncSPODocLibrary
{
    param ($sSiteUrl,$sUserName,$sPassword,$sCSOMPath,$sDocLibraryName,$sOperationType)
    try
    { 
        #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 
  
        $spoList = $spoCtx.Web.Lists.GetByTitle($sDocLibraryName)
        $spoCtx.Load($spoList)
        $spoCtx.ExecuteQuery()

        #Operation Type
        switch ($sOperationType) 
        { 
        "Enable" {
            Write-Host "Enabling syncrhonization for document library $sDocLibraryName" -ForegroundColor Green
            $spoList.ExcludeFromOfflineClient=$false
            }
        "Disable"{
            Write-Host "Disabling syncrhonization for document library $sDocLibraryName" -ForegroundColor Green
            $spoList.ExcludeFromOfflineClient=$true
            }
        default{
            Write-Host "Requested operation is not valid" -ForegroundColor Red
            }           
        }        
        $spoList.Update()
        $spoCtx.ExecuteQuery()
        $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>"
$sDocLibraryName="<Doc_Library_Name>"
$sOperationType="Enable"
EnableDisable-SyncSPODocLibrary -sSiteUrl $sSiteUrl -sUserName $sUserName -sPassword $sPassword -sCSOMPath $sCSOMPath -sDocLibraryName $sDocLibraryName -sOperationType $sOperationType

Referencia:

Office 365: How to get the sharing option applied to each site collection in SPO (II)!

Another approach to get the sharing option applied to each site collection in a SharePoint Online (SPO) tenant is by using PowerShell. You can download the script that allows to get such information from here: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: Cómo obtener los Add-Ins instalados en un sitio de SPO (II)!

Siguiendo con la serie de artículos sobre como obtener los Add-ins instalado en un sitio de SharePoint Online (SPO), en esta ocasión os comparto la aproximación programática por medido de PowerShell. Podéis descargaros el script desde el siguiente enlace: 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

SharePoint & Office 365: Compilation of blog posts (I)!

One of my new year resolutions is to continue writing articles in English in my personal blog. And of course, I will write a summary of all the articles written in English starting with the first one today Smile.

SharePoint 2013 & 2016

Office 365

Otther