Skip to main content

Posts

Showing posts from January, 2021

Update Internal ID to another column with powershell

 function Update-SPOListItem { param ( [Parameter(Mandatory=$true,Position=1)] [string]$Username, [Parameter(Mandatory=$true,Position=2)] [string]$Url, [Parameter(Mandatory=$true,Position=3)] [string]$AdminPassword, [Parameter(Mandatory=$true,Position=4)] [string]$ListTitle )        $password = ConvertTo-SecureString -string $AdminPassword -AsPlainText -Force $ctx=New-Object Microsoft.SharePoint.Client.ClientContext($Url) $ctx.Credentials = New-Object Microsoft.SharePoint.Client.SharePointOnlineCredentials($Username, $password) $ctx.Load($ctx.Web.Lists) $ctx.Load($ctx.Web) $ctx.Load($ctx.Web.Webs) $ctx.ExecuteQuery() $ll=$ctx.Web.Lists.GetByTitle($ListTitle) $ctx.Load($ll) $ctx.ExecuteQuery() $spqQuery = New-Object Microsoft.SharePoint.Client.CamlQuery $spqQuery.ViewXml = "@     <View> <Query> <ViewFields> <FieldRef Name='ID'></FieldRef> <FieldRef Name...