posts
In case of throttling ot large volume of request processing, there might be time out issues, throttling issues, etc.. skipping the setting application
$clientId = "xxxxxx" #Read-Host "Please enter the Entra Id registration:" # Connection String Variables, including client specific ID and Tenant $TenantUrl = "https://contoso.sharepoint.com" $TenantName = "contoso" function Invoke-With-Retry { param ( [scriptblock]$Operation, [string]$ErrorMessage, [string]$SuccessMessage, [int]$MaxRetries = 5, [int]$RetryDelay = 5 ) $attempt = 0 while ($attempt -lt $MaxRetries) { try { & $Operation Log-Message $SuccessMessage "Success" return } catch { $attempt++ if ($attempt -ge $MaxRetries) { Log-Message "$ErrorMessage.
posts
Duplicate tags/term sets were noticed while typing the term to select and the term set had 10k of terms making it harder to spot the issue. There are exisiting script to export term set but woul export only the first level and not the other levels and synonymns, hence the script
# ===== Logging =============================================================== $logFile = ".\term_export_Log-$(Get-Date -Format "yyyyMMdd-HHmm").csv" function Log-Message { param ( [string]$Message, [string]$Status = "Info" ) switch ($Status) { "Success" { $color = "Green" } "Info" { $color = "Blue" } "Error" { $color = "Red" } default { $color = "White" } } Write-Host -ForegroundColor $color "$Status => $Message" $logEntry = [PSCustomObject]@{ Timestamp = (Get-Date).
posts
cls # Connection String Variables, including client specific ID and Tenant $clientId = "xxxxxxx" #$dateTime = (Get-Date).toString("dd-MM-yyyy-hh-ss") $invocation = (Get-Variable MyInvocation).Value $directorypath = Split-Path $invocation.MyCommand.Path # Set parameters $csvPath = $directorypath + "\Sites.csv" # CSV should have a column 'SiteUrl' $destiUrl = "https://contoso.sharepoint.com/sites/test"; $destList = "OwnersMapping"; # Define users to exclude $excludedUsers = @("tom, roy", "mary, jane") $excludedusersemails = @("tom.roy@contoso.co.uk", "mary.jane@contoso.co.uk") # Output CSV for results #$outputCsv = $directorypath + ".