Skip to content

Instantly share code, notes, and snippets.

View devendrasv's full-sized avatar

Devendra Velegandla devendrasv

View GitHub Profile
<sites>
<site Url="https://velegandla.sharepoint.com/sites/training" >
<globalnav>
<nav Title="Menu1" Url="https://www.google.com"/>
<nav Title="Menu2" Url="https://www.Bing.com"/>
<nav Title="Menu3" Url="https://www.Yahoo.com"/>
</globalnav>
</site>
</sites>
#Credentials to connect to office 365 site collection url
$username="[email protected]"
$password="yourpassword"
$Password = $password |ConvertTo-SecureString -AsPlainText -force
Write-Host "Load CSOM libraries" -foregroundcolor black -backgroundcolor yellow
Set-Location $PSScriptRoot
Add-Type -Path (Resolve-Path "Microsoft.SharePoint.Client.dll")
Add-Type -Path (Resolve-Path "Microsoft.SharePoint.Client.Runtime.dll")
#Credentials to connect to office 365 site collection url
$url ="https://velegandla.sharepoint.com"
$username="[email protected]"
$password="yourpassword"
$Password = $password |ConvertTo-SecureString -AsPlainText -force
Write-Host "Load CSOM libraries" -foregroundcolor black -backgroundcolor yellow
Set-Location $PSScriptRoot
Add-Type -Path (Resolve-Path "Microsoft.SharePoint.Client.dll")
#Credentials to connect to office 365 site collection url
$url ="https://velegandla.sharepoint.com/sites/training"
$username="[email protected]"
$password="yourpassword"
$Password = $password |ConvertTo-SecureString -AsPlainText -force
# site column and content tye id
$Name ="SPJName"
$contentTypeId ="0x0100AEF836037845AD47AD8F87A8C5736D4E"
#Credentials to connect to office 365 site collection url
$url ="https://velegandla.sharepoint.com/sites/training"
$username="[email protected]"
$password="yourpassword"
$Password = $password |ConvertTo-SecureString -AsPlainText -force
# site columns
$Name ="SPJName"
Write-Host "Load CSOM libraries" -foregroundcolor black -backgroundcolor yellow
#Credentials to connect to office 365 tenenat admin url
$url ="https://velegandla-admin.sharepoint.com"
$username="[email protected]"
$password="yourpassword"
$Password = $password |ConvertTo-SecureString -AsPlainText -force
Write-Host "Load CSOM libraries" -foregroundcolor black -backgroundcolor yellow
Set-Location $PSScriptRoot
Add-Type -Path (Resolve-Path "Microsoft.SharePoint.Client.dll")
<?xml version="1.0" encoding="utf-8" ?>
<Group Name="India" Id="CC6E1ADE-444B-4642-8AB7-BBC6DB51FEDE">
<TermSet Name="States" Id="EC83F362-625D-48B7-B4DD-5A9C484FB7E7">
<Term Name="AP" />
<Term Name="UP" />
<Term Name="MP" />
</TermSet>
<TermSet Name="Rivers" Id="DE1B5F85-2F6E-4773-BD7D-E09139BAEE5A">
<Term Name="Ganga" />
<Term Name="Yamuna" />
<sites>
<site Name="Training" Url="https://velegandla.sharepoint.com/sites/training/" >
<solutions>
<WSP Name="SPJ.Portal.wsp"/>
</solutions>
</site>
</sites>
#Credentials to connect to office 365 tenenat admin url
$url ="https://velegandla-admin.sharepoint.com"
$username="[email protected]"
$password="yourpassword"
$Password = $password |ConvertTo-SecureString -AsPlainText -force
Write-Host "Load CSOM libraries" -foregroundcolor black -backgroundcolor yellow
Set-Location $PSScriptRoot
Add-Type -Path (Resolve-Path "Microsoft.SharePoint.Client.dll")
@devendrasv
devendrasv / updatedisplayname.ps1
Created July 13, 2014 21:41
update column displayname
$w = Get-SPWeb "http://site"
$f = $w.Fields["date_reported"] #internal name of the column
$f.Title = "date reported" #new display name of date_reported column
$f.Update()