sharepoint online - Getting Error while running Powershell Script to add Site Content Link -
$adminupn="xxxxx@home500.onmicrosoft.com" $orgname="xxxxxx" $usercredential = get-credential -username $adminupn -message "type password." connect-sposervice -url https://$orgname-admin.sharepoint.com -credential $usercredential # begin process $loadinfo1 = [system.reflection.assembly]::loadwithpartialname("microsoft.sharepoint.client") $loadinfo2 = [system.reflection.assembly]::loadwithpartialname("microsoft.sharepoint.client.runtime") $loadinfo3 = [system.reflection.assembly]::loadwithpartialname("microsoft.sharepoint.client.userprofiles") #add sharepoint powershell snapin if not added $snapin = get-pssnapin | where-object {$_.name -eq 'microsoft.sharepoint.powershell'} if ($snapin -eq $null) { write-host "loading sharepoint powershell snapin" add-pssnapin "microsoft.sharepoint.powershell" -ea silentlycontinue } cls $starttime = $(get-date -f f) $timestamp = get-date ...