Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- $loadInfo1 = [System.Reflection.Assembly]::LoadWithPartialName("Microsoft.SharePoint.Client")
- $loadInfo2 = [System.Reflection.Assembly]::LoadWithPartialName("Microsoft.SharePoint.Client.Runtime")
- $webUrl = Read-Host -Prompt "HTTPS URL for the SP Online 2013 site"
- $username = Read-Host -Prompt "Email address login"
- $password = Read-Host -Prompt "Password for $username" -AsSecureString
- $ctx = New-Object Microsoft.SharePoint.Client.ClientContext($webUrl)
- $ctx.Credentials = New-Object Microsoft.SharePoint.Client.SharePointOnlineCredentials($username, $password)
- $web = $ctx.Web
- $lists = $web.Lists
- $ctx.Load($lists)
- $ctx.ExecuteQuery()
- $lists| select -Property Title
- $ctx = New-Object Microsoft.SharePoint.Client.ClientContext($webUrl)
- $ctx.Credentials = New-Object Microsoft.SharePoint.Client.SharePointOnlineCredentials($username, $securedPassword)
- $field = $ctx.Site.RootWeb.Fields.GetByInternalNameOrTitle($fieldTitle)
- $field.Description = $fieldDesc
- $field.UpdateAndPushChanges($True)
- $ctx.ExecuteQuery()
Add Comment
Please, Sign In to add comment