Let's SharePoint

January 2018

  1. HOME
  2. Monthly Archives: January 2018
January 30, 2018 / Last updated : January 30, 2018 Sethu Client Object Model

How to create a Survey in SharePoint using CSOM?

Hello SharePointers, Here are the CSOM code to create a survey list in SharePoint 2010/203 or SharePoint Online. public static void CreateSurveyList() { ClientContext ctx = new ClientContext(“http://mysite”); ListCreationInformation lci = new ListCreationInformation(); lci.Description = “Test Survey”; lci.Title = “First Survey”; lci.TemplateType = 102; List newSurveyList = ctx .Web.Lists.Add(lci); ctx .Load(newSurveyList); ctx .ExecuteQuery(); } Happy […]

January 10, 2018 / Last updated : January 10, 2018 Sethu PowerShell

How to republish all the content types in a Content Hub using Powershell in SharePoint 2010/2013/2016?

Hello SharePointers, Below are the Powershell commands to republish all the content types in a Content Hub using Powershell. Add-PSSnapin microsoft.sharepoint.powershell function RepublishHubContentTypes ($HubURL) { $HubSite = Get-SPSite $HubURL $Web = $HubSite.RootWeb #Check the site is a content type hub if ([Microsoft.SharePoint.Taxonomy.ContentTypeSync.ContentTypePublisher]::IsContentTypeSharingEnabled($HubSite)) { #Set up ContentTypePublisher object to allow publishing through the Content Type Hub […]

January 5, 2018 / Last updated : January 5, 2018 Sethu Office 365

How to set Managed property to searchable,queryable,sortable, refinable in SharePoint 2010/2013/2016 using Powershell?

Hello SharePointers, Here are the powershell script to set Searchable, queryable, Sortable, Retrievable, Refinable for a managed property. $searchappln = Get-SPEnterpriseSearchServiceApplication $ManagedProperty = Get-SPEnterpriseSearchMetadataManagedProperty -SearchApplication $searchappln -Identity $_.ManagedPropertyName -ea silentlycontinue if($ManagedProperty) { $ManagedProperty.Searchable = $true $ManagedProperty.Queryable = $true $ManagedProperty.Sortable = $true $ManagedProperty.Retrievable = $true $ManagedProperty.Refinable = $true $ManagedProperty.SafeForAnonymous = $true $ManagedProperty.update() write-host “The searchable, queryable, […]

January 5, 2018 / Last updated : January 5, 2018 Sethu Office 365

How to delete older version of sharepoint list items using Powershell in Sharepoint 2010/2013/2016?

Hello SharePointers, Below is the Powershell script to delete the older version of SharePoint list item. This script will delete the older version which lasts more than 12 months or after. $SPweb = Get-SPWeb “http://mysite/goodness” $limit = (Get-Date).AddMonths(-12) $SPlist = $SPweb.Lists[“Doc1”] foreach ($SPitem in $SPlist.Items) { $VersionsCount= $SPItem.Versions.count for($v=$VersionsCount-1;$v -ge 0;$v–) { if($SPitem.Versions[$v].IsCurrentVersion){ } else{ […]

January 5, 2018 / Last updated : January 5, 2018 Sethu Office 365

How to Enable/Disable Modern Site pages using PnP Powershell in Office 365?

Hello SharePointers, Here are the below Pnp Scripts to enable /disable Modern Site Pages in Office 365/SharePoint 2016. # Connect to your sharepoint site $cred = Get-Credential Connect-PnPOnline -Url https://[mytenant].sharepoint.com/sites/siteurl -Credentials $cred # Disable Modern site pages  Disable-PnPFeature -Identity B6917CB1-93A0-4B97-A84D-7CF49975D4EC -Scope Web #Enable Modern site pages #Enable-PnPFeature -Identity B6917CB1-93A0-4B97-A84D-7CF49975D4EC -Scope Web Happy SharePointing 🙂

Recent posts

How to insert table in Modern Pages using PnP Powershell in Office 365/Sharepoint Online?

June 7, 2019

How to set up Access Requests in SharePoint online using Powershell?

May 11, 2019

How to change the default SharePoint suite logo in SharePoint 2013/2016/2019?

April 30, 2019

How to add metadata to Document libraries in SharePoint online using powershell.

April 27, 2019

How to get Sharepoint site details using Powershell in Office 365?

April 17, 2019

How to get alerts for a specific policy in Cloud app security using Powershell

April 16, 2019

How to get the list of custom apps in App catalog using Powershell?

April 9, 2019

How to get the list of policies in Microsoft Cloud app security using window powershell?

April 4, 2019

How to get the list of List and Document library item counts in SharePoint online using Pnp Powershell ?

April 4, 2019

How to restore subsite in a Sharepoint online site collection using Pnp Powershell

April 2, 2019

Category

  • Anonymous access
  • Client Object Model
  • Client Side Object Model
  • Customization
    • Customization
  • Designer Workflows
  • Errors & Resolutions
  • Features
  • Google Analytics
  • InfoPath
  • Item Scheduling
  • JSOM
  • Nintex worflows
  • Office 365
  • Office 365 Groups
  • PnP JS Library
  • PowerShell
  • Powershell Online
  • REST API
  • REST API's
  • Server Side Object Model
  • SharePoint 2010
  • SharePoint 2010 Search
  • SharePoint 2013
  • SharePoint 2013 Search
  • SharePoint 2013 Workflows
  • SharePoint 2016
  • SharePoint 2019
  • SharePoint Designer
  • SharePoint Framework
  • SharePoint Online
  • SharePoint Pnp
  • SharePoint Usage Analytics
  • Unique values
  • User Profile Services
  • Windows Powershell
  • Workflow Manager

Archive

  • June 2019
  • May 2019
  • April 2019
  • March 2019
  • February 2019
  • January 2019
  • December 2018
  • November 2018
  • October 2018
  • September 2018
  • August 2018
  • July 2018
  • May 2018
  • April 2018
  • March 2018
  • February 2018
  • January 2018
  • December 2017
  • November 2017
  • October 2017
  • June 2017
  • May 2017
  • April 2017
  • March 2017
  • February 2017
  • January 2017
  • November 2016
  • October 2016
  • September 2016
  • August 2016
  • July 2016
  • June 2016
  • January 2016
  • November 2015
  • October 2015
  • September 2015
  • August 2015
  • July 2015
  • May 2015
  • April 2015
  • March 2015

Copyright © Let's SharePoint All Rights Reserved.

Powered by WordPress & Lightning Theme by Vektor,Inc. technology.