Category Archives: Powershell

Enable SQL Azure access from Azure WebJobs by adding firewall rules using PowerShell

Hi, When we are developing custom Azure Web Apps or WebJobs, likely we will need access to Azure SQL database. Depends on the needs you will use Entity Framework, or direct Queries using Stored Procedures, but this is not the topic of this post. The topic today is how to allow our Azure WebJob to Read More →

How to list all Site Custom Actions using CSOM and PowerShell in Office 365

Hi, Today a short one :P, I’d like to share how to query and list all Custom Action for a SharePoint Online Site Collection using CSOM:   HTH @jquintozamora

Convert from two letters language code to four letters Language Tag with PowerShell

Hi, This post is about how to convert two letter language code to four letter language tag format (Language Tag defined by Microsoft). Introduction Windows Language Tag was defined based on IETF BCP 47 best practice that defines “Tags for Identify Languages” and all the values and the Windows version where released are documented here Read More →

Using PowerShell To retrieve all Sites (Web Object) recursively from SharePoint Online

Hi there, When you deploy a solution in SharePoint Online (SPO) sometimes, you need to apply some post – configurations and need to iterate thru all sites and sub-sites in a given Site Collection. In general talking about Office 365, there is more frequent the use of PowerShell to solve some kind of processes automation. Read More →

Using PowerShell to Add WebPart to SharePoint Page via CSOM in Office 365

Hi, This time, I was supposed to add a webpart to SharePoint Online page programmatically. It depends on our requirements, but we could use JavaScript or other Client Object Model libraries to add a web part to SharePoint page. My advice is, even if your requirements guide you to write PowerShell script, try to use Read More →

Using PowerShell to Set Available Web Templates via CSOM in SharePoint Online / Office 365

Hi, Sometimes, the easiest way to deploy some additions, or updates in an already deployed SharePoint Online solution, is using PowerShell. In my case, I had the requirement of updating some Web Templates in a Office 365 Intranet and enable these Web Templates to be used in several sites that were already provisioned. So, ideally Read More →

SharePoint Online PowerShell problem: Cannot convert the "Microsoft.SharePoint.Client.ClientContext"

Hi, When we are doing a SharePoint deployment using PowerShell there we could find similar problem like that: Cannot convert the “Microsoft.SharePoint.Client.ClientContext” value of type “Microsoft.SharePoint.Client.ClientContext” to type “Microsoft.SharePoint.Client.ClientRuntimeContext”.” In my scenario I was trying to Activate a Sandboxed solution using PowerShell: $ctx = New-Object Microsoft.SharePoint.Client.ClientContext($siteUrl); $credentials = New-Object Microsoft.SharePoint.Client.SharePointOnlineCredentials($adminUsername, $secureAdminPassword); $ctx.Credentials = $credentials [Microsoft.SharePoint.Client.Publishing.DesignPackage]::Install($ctx, Read More →

How to attach an event receiver for an specific list in SharePoint 2013

In SharePoint we can use event receivers to trigger events like adding, updating, deleting elements from a list. When we need to do some extra tasks it is really useful and straightforward method. I’d like to explain what happens behind scenes when we are creating Event Receiver project in Visual Studio. In this case I Read More →

Añadir un servidor al cluster de Distributed Cache en SharePoint 2013

SharePoint 2013 trae un nuevo servicio de cacheo de datos al que llama Distributed Cache. Este servicio se activa automáticamente para todos los servidores WFE y APPs de la granja de SharePoint. Me gustaría explicar en otro post o artículo en detalle como funciona este servicio, lo tengo en los to do’s. Pero lo que Read More →

Cómo mover colecciones de sitios entre entornos de SharePoint

Una de las prácticas más necesitadas de SharePoint es poder actualizar el contenido entre entornos, por ejemplo, actualizar tu colección de sitios desde el servidor de PROD o UAT hasta Desarrollo. Si alguien lo hace sin tener ningún problema, que lo comente y le invitamos a una caña. Para ello hay que tener en cuenta Read More →