Skip to main content

Posts

Showing posts with the label Upgrade

Delete a particular web part from all the sites ans sub sites

Please us below PowerShell script to delete a particular web part from all the sites ans sub sites, Add-PSSnapin "Microsoft.SharePoint.PowerShell" #$CSVFile = Import-CSV -Path "E:\Ulhas\Subsites.csv" $filepath = "E:\Ulhas\Subsites.csv" Import-CSV $filepath -Header SiteUrl | Foreach-Object{     $SPweb = Get-SPWeb $_.SiteUrl #"https://www.contoso.com/it/pmo/"     $webpartmanager = $SPweb.GetLimitedWebPartManager(($SPweb.Url + "default.aspx"),  [System.Web.UI.WebControls.WebParts.PersonalizationScope]::Shared)        $webpartsarray = @()      For($i=0;$i -lt $webpartmanager.WebParts.Count;$i++)       {         if($webpartmanager.WebParts[$i].title -eq "ScriptToRemoveBlankSpace")  #Check for particular web part          {           $webpartsarray = $webpartsarray + $webpartmanager.WebParts[$i].ID        ...

Article page showing HTML tags in SharePoint 2013

Article page showing HTML tags, use below PowerShell to fix as mentioned here : http://labs.steveottenad.com/publishing-columns-show-escaped-html-in-sharepoint-2010/ Add-PSSnapin "Microsoft.SharePoint.PowerShell" $web = Get-SPWeb "https://contoso.com/sites/mysite/it/" $list = $web.GetPublishingPages(); foreach ($page in $list.Items) {     if ($page.Title -eq "Testing123")     {         [Microsoft.SharePoint.Publishing.Fields.HtmlField]$field = [Microsoft.SharePoint.Publishing.Fields.HtmlField]$list.Fields[“Page Content”]         $field.RichText = $true         $field.RichTextMode = [Microsoft.SharePoint.SPRichTextMode]::FullHtml         $field.Update()         break;     } } $list.Update() $web.dispose() Hope this helps!!!

How to move list paging in top right corner in SharePoint 2013

Add script editor web part and paste the below code to move list paging in top right corner in SharePoint 2013, < script type = "text/javascript" > $ ( document ).ready( function () {   var header = $ ( "table.ms-listviewtable" );   var table = $ ( "#bottomPagingCellWPQ3" );     if (header & & table)     {         table. insertBefore (header);         $ ( "#bottomPagingCellWPQ3" ).css( 'text-align' , 'right' );     }     else     {         alert ( 'jQuery did not found Elements.' );     } }); </ script > < style type = "text/css" > td #bottomPagingCellWPQ3 {float:right} </ style > Hope this helps!!!

Convert classic users to claims using PowerShell

# START INITIALISATIONS Add-PSSnapin Microsoft.SharePoint.PowerShell -erroraction SilentlyContinue #Initialise Web $web = Get-SPWeb -identity "site collection URL" #Initialise Sharepoint list $list = $web.Lists["Site Owner Survey Input Form"]     write-host $web write-host $list #Initialise AD $_Searcher= New-Object System.DirectoryServices.DirectorySearcher $_Searcher.PageSize = 1000 # END INITIALISATIONS # START Main Code $filepath = "D:\MyInput.csv" Import-CSV $filepath | foreach-object{ $siteurl = $_.siteurl $landid = $_.lanid $sameaccountname = $landid write-host $siteurl write-host $landid write-host $sameaccountname   $claim = "i:0ǵ.t|federation.global.xyz.com|" + $sameaccountname $cp = New-SPClaimsPrincipal -Identity $claim -IdentityType "EncodedClaim" $user = $web.EnsureUser($cp.ToEncodedString())                     $newItem = $list.Items.Add() $newItem["Title"] = $siteurl; $newIte...

Migrated content verification from MOSS 2007 to SharePoint 2010/2013

The below links may help for migration/upgrade of SharePoint environment, http://community.rightpoint.com/blogs/viewpoint/archive/2015/03/29/create-and-compare-a-source-and-target-site-inventory-using-powershell.aspx http://www.sharepointpals.com/post/Activities-to-be-performed-before-Upgrade-Migrate-from-SharePoint-2010-to-SharePoint-2013 Upgrade Worksheet from MS-  http://www.microsoft.com/en-us/download/details.aspx?id=30370