[Eventos]: Materiales de mi sesión en el SharePoint Saturday de Lima!

El pasado sábado 22 de agosto, y gracias a la invitación de Edgar Alaejos y Andrés Rojas como organizadores del evento, participé virtualmente en el primer SharePoint Saturday de Lima. En mi caso, la sesión que impartí (con algún que otro problemilla de conexión) fue la siguiente: PowerShell para SharePoint OnPremises y Online, la herramienta compartida por Desarrolladores e IT PROs. Los materiales del evento (PPT) y Scrips PowerShell ya están listos para su descarga:

SharePoint Online: Como averiguar la Url del Content Type Hub!

En SharePoint Online disponemos de serie de la funcionalidad de Content Type Hub que permite definir una colección de sitios centralizada que actúe como Hub donde crear y publicar los Tipos de Contenido a utilizar en otras colecciones de sitios del tenant de SharePoint Online. Por defecto, el Content Type Hub está oculto y no visible en la Administración de SharePoint Online…pero, podemos averiguar fácilmente su Url:

  • Accedemos a la página de configuración del sitio y en la sección Site Collection Administration hacemos clic en “Content type publishin”.
  • En la página que se abre, entre otras configuraciones podremos encontrar la Url del Content Type Hub.

image

image

  • Y la colección de sitios del Hub está basada en la plantilla de sitio de grupo como podremos comprobar accediendo a la misma.

image

SharePoint Online: How to create a List view with PowerShell!

This time I’m sharing a new PowerShell Script that allows to create a List View in a SharePoint Online list using the Client Side Object Model (CSOM) in a PowrShell Script. You can download the PowerShell script from the following location: How to create a List View in SharePoint Online using PowerShell

############################################################################################################################################

#Script that allows to create a new view in a SharePoint Online List

# Required Parameters:

#  -> $sUserName: User Name to connect to the SharePoint Online Site Collection.

#  -> $sPassword: Password for the user.

#  -> $sSiteUrl: SharePoint Online Site Url.

#  -> $sListName: Name of the list where the new view is going to be added.

#  -> $sViewName: Name of the view to be added.

############################################################################################################################################

 

$host.Runspace.ThreadOptions = "ReuseThread"

 

#Definition of the function that allows to create a new view in a SharePoint Online list

function Create-NewListViewSPO

{

    param ($sSiteUrl,$sUserName,$sPassword,$sListName,$sViewName)

    try

    {    

        #Adding the Client OM Assemblies        

        Add-Type -Path "<CSOM_Path>\Microsoft.SharePoint.Client.dll"

        Add-Type -Path "<CSOM_Path>\Microsoft.SharePoint.Client.Runtime.dll"

 

        #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      

 

        Write-Host "----------------------------------------------------------------------------"  -foregroundcolor Green

        Write-Host "Adding the View $sViewName to the List $sListName !!" -ForegroundColor Green

        Write-Host "----------------------------------------------------------------------------"  -foregroundcolor Green        

 

        #Getting the list to be updated with a new view        

        $spoList=$spoCtx.Web.Lists.GetByTitle($sListName)

        $spoCtx.Load($spoList)

 

        #Defining the new List View

        $spoViewCreationInformation=New-Object Microsoft.SharePoint.Client.ViewCreationInformation

        $spoViewCreationInformation.Title=$sViewName

        $spoViewCreationInformation.ViewTypeKind= [Microsoft.SharePoint.Client.ViewType]::None        

        $spoViewCreationInformation.RowLimit=30

        $spoViewCreationInformation.SetAsDefaultView=$true        

        $spoViewCreationInformation.ViewFields=@("Title","Created","Modified")        

 

        #Getting the collection of views of the List

        $spoListViews=$spoList.Views

        $spoCtx.Load($spoListViews)             

        $spoCtx.ExecuteQuery()                

        $spListViewToAdd=$spoListViews.Add($spoViewCreationInformation)

 

        #Adding the view to the List

        $spoCtx.Load($spListViewToAdd)                

        $spoCtx.ExecuteQuery()

        Write-Host "----------------------------------------------------------------------------"  -foregroundcolor Green

        Write-Host "View $sViewName added to the List $sListName !!" -ForegroundColor Green

        Write-Host "----------------------------------------------------------------------------"  -foregroundcolor Green  

        $spoCtx.Dispose()

    }

    catch [System.Exception]

    {

        write-host -f red $_.Exception.ToString()   

    }    

}

 

#Required Parameters

$sSiteUrl = "https://<O365Domain>.sharepoint.com/<SPO_Site>" 

$sUserName = "<O365User>@<O365Domain>.onmicrosoft.com" 

$sListName= "<SPO_List_Name>"

$sViewName="<SPO_View_Name>"

#$sPassword = Read-Host -Prompt "Enter your password: " -AsSecureString  

$sPassword=convertto-securestring "<SPO_Password>" -asplaintext -force

 

Create-NewListViewSPO -sSiteUrl $sSiteUrl -sUserName $sUserName -sPassword $sPassword -sListName $sListName -sViewName $sViewName

 

The result you will get once you execute the script in a SharePoint Online site is the following one:

image

SharePoint Online: Como crear una vista de lista con PowerShell!

En esta ocasión os dejo un script que permite crear una vista en una lista de SharePoint Online haciendo uso del modelo de objetos en cliente (CSOM) desde PowerShell. Podéis descargaros el script desde el siguiente enlace: How to create a List View in SharePoint Online using PowerShell

############################################################################################################################################

#Script that allows to create a new view in a SharePoint Online List

# Required Parameters:

#  -> $sUserName: User Name to connect to the SharePoint Online Site Collection.

#  -> $sPassword: Password for the user.

#  -> $sSiteUrl: SharePoint Online Site Url.

#  -> $sListName: Name of the list where the new view is going to be added.

#  -> $sViewName: Name of the view to be added.

############################################################################################################################################

 

$host.Runspace.ThreadOptions = "ReuseThread"

 

#Definition of the function that allows to create a new view in a SharePoint Online list

function Create-NewListViewSPO

{

    param ($sSiteUrl,$sUserName,$sPassword,$sListName,$sViewName)

    try

    {    

        #Adding the Client OM Assemblies        

        Add-Type -Path "<CSOM_Path>\Microsoft.SharePoint.Client.dll"

        Add-Type -Path "<CSOM_Path>\Microsoft.SharePoint.Client.Runtime.dll"

 

        #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      

 

        Write-Host "----------------------------------------------------------------------------"  -foregroundcolor Green

        Write-Host "Adding the View $sViewName to the List $sListName !!" -ForegroundColor Green

        Write-Host "----------------------------------------------------------------------------"  -foregroundcolor Green        

 

        #Getting the list to be updated with a new view        

        $spoList=$spoCtx.Web.Lists.GetByTitle($sListName)

        $spoCtx.Load($spoList)

 

        #Defining the new List View

        $spoViewCreationInformation=New-Object Microsoft.SharePoint.Client.ViewCreationInformation

        $spoViewCreationInformation.Title=$sViewName

        $spoViewCreationInformation.ViewTypeKind= [Microsoft.SharePoint.Client.ViewType]::None        

        $spoViewCreationInformation.RowLimit=30

        $spoViewCreationInformation.SetAsDefaultView=$true        

        $spoViewCreationInformation.ViewFields=@("Title","Created","Modified")        

 

        #Getting the collection of views of the List

        $spoListViews=$spoList.Views

        $spoCtx.Load($spoListViews)             

        $spoCtx.ExecuteQuery()                

        $spListViewToAdd=$spoListViews.Add($spoViewCreationInformation)

 

        #Adding the view to the List

        $spoCtx.Load($spListViewToAdd)                

        $spoCtx.ExecuteQuery()

        Write-Host "----------------------------------------------------------------------------"  -foregroundcolor Green

        Write-Host "View $sViewName added to the List $sListName !!" -ForegroundColor Green

        Write-Host "----------------------------------------------------------------------------"  -foregroundcolor Green  

        $spoCtx.Dispose()

    }

    catch [System.Exception]

    {

        write-host -f red $_.Exception.ToString()   

    }    

}

 

#Required Parameters

$sSiteUrl = "https://<O365Domain>.sharepoint.com/<SPO_Site>" 

$sUserName = "<O365User>@<O365Domain>.onmicrosoft.com" 

$sListName= "<SPO_List_Name>"

$sViewName="<SPO_View_Name>"

#$sPassword = Read-Host -Prompt "Enter your password: " -AsSecureString  

$sPassword=convertto-securestring "<SPO_Password>" -asplaintext -force

 

Create-NewListViewSPO -sSiteUrl $sSiteUrl -sUserName $sUserName -sPassword $sPassword -sListName $sListName -sViewName $sViewName

 

El resultado que obtendréis tras ejecutar el script en un sitio de SharePoint Online es el siguiente:

image

SharePoint 2013 & SharePoint Online: Diferencias entre listas nativas y listas externas!

Como sabéis, las listas externas permiten en SharePoint OnPremises y en SharePoint Online renderizar datos de un sistema de negocio en la forma de una lista de SharePoint, pero no de una lista nativa ya que las lisas externas presentan una serie de diferencias con respecto a las listas convencionales que aparecen recogidas en el siguiente enlace: https://support.office.com/en-gb/article/Differences-between-native-and-external-lists-6601eda9-b722-4bf8-a2bf-ce25cf3d2fd0?CorrelationId=b5265806-cefd-4404-941a-b307b5097b78&ui=en-US&rs=en-GB&ad=GB

SharePoint 2013 & Office 365: Resumen de posts (LXIX)!

Como siempre, después del recopilatorio de enlaces interesantes, es momento del resumen de artículos publicados en este blog durante el mes de junio.

Capacidades

Desarrollo

IT

Office 365

Otros

SharePoint & Office 365: Compilation of interesting links (VIII)!

Every month I use to share all the interesting links and resources I have found about the SharePoint and Office 365 platforms during the previous month. As you can see, this is the 8th compilation of interesting links I publish in English and I hope you find all of them useful.

Capacities

Sites vs Site Collections in SharePoint

Development

IT Pro

Office 365