Add-Type -Path "C:\Program Files\Common Files\microsoft shared\Web Server Extensions\16\ISAPI\Microsoft.SharePoint.Client.dll" Add-Type -Path "C:\Program Files\Common Files\microsoft shared\Web Server Extensions\16\ISAPI\Microsoft.SharePoint.Client.Runtime.dll" function GetListItemCount($siteUrl) { #*** you can also move below line outside the function to get rid of login again if you need to call the function multiple time. *** $Cred= Get-Credential $ctx = New-Object Microsoft.SharePoint.Client.ClientContext($siteURL) $credentials = New-Object Microsoft.SharePoint.Client.SharePointOnlineCredentials($Cred.Username, $Cred.Password) $ctx.Credentials = $credentials $web = $ctx.Web $lists = $web.Lists $ctx.Load($lists) $ctx.ExecuteQuery() Write-Host -ForegroundColor Yellow "The site URL is" $siteUrl #output the...
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