Try{ Add-Type -Path 'C:\Program Files\Common Files\microsoft shared\Web Server Extensions\15\ISAPI\Microsoft.SharePoint.Client.dll' Add-Type -Path 'C:\Program Files\Common Files\microsoft shared\Web Server Extensions\15\ISAPI\Microsoft.SharePoint.Client.Runtime.dll' } catch { } $siteUrl = "https://SiteCollectionURL" $username = "rb@pop.onmicrosoft.com" $password=ConvertTo-SecureString "*********" -AsPlainText -Force $ctx = New-Object Microsoft.SharePoint.Client.ClientContext($siteUrl) $credentials = New-Object Microsoft.SharePoint.Client.SharePointOnlineCredentials($username, $password) $ctx.Credentials = $credentials $web = $ctx.Web $lists = $web.Lists $ctx.Load($lists) $ctx.ExecuteQuery() $lists| select -Property Title, ID
Hi! I'm Ramesh Beerla, working as a Team Lead and passionate about developing automated solutions to customers. In this blog I will post some important articles which will be useful for fellow developers