posts
Some sharing settings are not inherited from the Teams to the channels,
E.g. disabling company wide sharing are not inherited and if it’s disabled at the teams level it needs to be done for associate channels.
$domain = "contoso" $teamName = @( "test", "CTO" ) $clientId = "xxxx" $adminSiteURL = "https://$domain-Admin.SharePoint.com" Connect-PnPOnline -Url $adminSiteURL -ClientId $clientId $teamName | ForEach-Object { $team = Get-PnPTeamsTeam -Identity $_ $m365GroupId = $team.GroupId Get-PnPTenantSite | Where-Object { $_.
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
If you try get-pnpfile using full path, the url needs to be encoded. There are loads of issues with special charaters like [ ] becomes %5B and %5D in
$encodedfileUrl = [System.Web.HttpUtility]::UrlPathEncode($fileUrl) $item = Get-PnPFile -Url $encodedfileUrl -AsListItem -ErrorAction Stop Log-Message "Retrieved file: $fileUrl" "Success" Those two methods don’t handle [ ] [System.Web.HttpUtility]::UrlPathEncode(…): obsolete and doesn’t encode [/]. [System.Uri]::EscapeUriString(…): does not encode [ and ] and may leave other characters unencoded.