Automating SharePoint Online Tasks (O365) using PowerShell + CSOM – Part 5

This is my fourth ​blog post in the Automating SharePoint Online using PowerShell + CSOM Series. Here are the list of old posts in this series.

Automating SharePoint Online Tasks (O365) using PowerShell + CSOM – Part 1​

Automating SharePoint Online Tasks (O365) using PowerShell + CSOM – Part 2​

Automating SharePoint Online Tasks (O365) using PowerShell + CSOM – Part 3

Automating SharePoint Online Tasks (O365) using PowerShell + CSOM – Part 4

Just to reiterate, what we want to achieve is to create site columns and content types and then adding site columns to content type and then finally adding content type to list.

So in this blog post I am going to show you how to Content Type to a SharePoint List/Library using PowerShell and CSOM.

 

$ErrorActionPreference = "silentlycontinue"
    # ......START Authenticate....................
   .\1_Authenticate.ps1
    #........END Authenticate.....................
    #........START - Get Web......................
    $web = $ctx.Web
    $list = $web.Lists.GetByTitle("SPSOttawa")
    $ctx.Load($web)
    $ctx.Load($list)
    $ctx.ExecuteQuery()
     #........END - Get Web...............

    $contentTypes = $web.ContentTypes;
    $ctx.Load($contentTypes);
    $ctx.ExecuteQuery();

    $spsOttawaCT = $contentTypes.GetById("0x0101009189AB5D3D2647B580F011DA2F356FB2");
    $ctx.Load($spsOttawaCT);
    $ctx.ExecuteQuery();
    $listContentTypes = $list.ContentTypes
    $ctx.Load($listContentTypes);
    $ctx.ExecuteQuery();

    $myCT = $list.ContentTypes.AddExistingContentType($spsOttawaCT);
    $ctx.load($myCT); 
    $ctx.ExecuteQuery() ;

 

That would add your content type to your list.

 

SharePoint Summit – Toronto 2014

I presented two session on last SharePoint Summit Toronto 2014. Well atleast that is what I heard during the conference that SPSummit will not be returning to Toronto. Which is bit sad.

SPSummitTO.jpg

I presented two sessions on
1) What is new with SharePoint 2013 workflows 
2) Enable SMART SEARCH for Document Management​​​​​​.
I would like to thank everyone who attended my session. Please find my presentation slides below.
Kudos to all the organisors, sponsors and volunteers for successful event!!!
Note: I have not uploaded my Search slide deck to slideshare yet but will update this post as soon I do that.

SharePoint Saturday Chicago Suburbs – 2014

On May 17th, I got an opportunity to speak at SharePoint Saturday Chicago Suburbs 2014. Initially my session was not selected given I submitted my session using new SPS Events site but later there was an open spot for the speaker and I accepted to speak.
Chiburbs.png

The event was at Devry college.

I presented a session in the Office 365 track on how to automate Office 365 using PowerShell and Client Side Object Model (CSOM). The event was very well organized and I met many old friends and made some new.
I would like to thank everyone who attended my session. Please find my presentation slides below.
Kudos to all the organisors, sponsors and volunteers for successful event!!!

Automating SharePoint Online Tasks (O365) using PowerShell + CSOM – Part 4

This is my fourth ​blog post in the Automating SharePoint Online using PowerShell + CSOM Series. Here are the list of old posts in this series.

Automating SharePoint Online Tasks (O365) using PowerShell + CSOM – Part 1​

Automating SharePoint Online Tasks (O365) using PowerShell + CSOM – Part 2​

Automating SharePoint Online Tasks (O365) using PowerShell + CSOM – Part 3

Just to reiterate, what we want to achieve is to create site columns and content types and then adding site columns to content type and then finally adding content type to list.

So in this blog post I am going to show you how to add site columns to Content Type using PowerShell and CSOM.

Continue reading “Automating SharePoint Online Tasks (O365) using PowerShell + CSOM – Part 4”

SharePoint : Migrating User Alerts

When you do Version to Version (V2V) upgrade for your SharePoint domain may change (for whatever reason) or in case of FBA your membership provider name gets changed. I am not going to get into the details why that would happen and how to handle your upgrade in those scenarios.

What I am going to talk about is one big issue that will occur when you run into the above scenario. That is issue is all the user Alerts will not be displayed. When I say not be displayed what I mean is that Alerts will be upgraded (I am assuming you kept your Portal URL the same) but when users login to the portal they will not see the Alerts. Why is that, you asked? Well before you start blaming SharePoint, let me tell you, that SharePoint is doing its job right. Each Alert have User and UserID assigned to it. The momentum Domain name changes or your membership provider changes, New UserID gets created for the same user and for SharePoint there is no Alerts set for that user and hence it will not display any Alerts. Unfortunately SharePoint does not have face recognition technology built into it… YET.. J

Continue reading “SharePoint : Migrating User Alerts”

SharePoint 2013: How to hide FBA Login page warning

When working with SharePoint 2013 and using Forms Based Authentication (FBA) you would notice that SharePoint assumes that you will be using FBA with extranet scenario and on login page it gives you a warning message which looks something like this.

FBA1.gif

Basically SharePoint detects that your page is not using secure connection i.e. HTTPS and hence it warns you that you should use HTTPS given your username and password will be sent in clear text. Fair enough. But what if you have a UAT environment and you are not using HTTPS and you want to remove that warning message given you do not want your test users to be concerned.

Well there are two options to this.

Continue reading “SharePoint 2013: How to hide FBA Login page warning”