refactor: Simplify Connect-SharePoint by removing unsupported parameters

This commit is contained in:
Bobby Abellana (aider) 2025-02-19 15:17:44 -08:00
parent dacdc42716
commit a5ba06c2bf

View File

@ -47,14 +47,11 @@ function Connect-SharePoint {
# Ignore disconnection errors # Ignore disconnection errors
} }
# Use web login with additional parameters for stability # Use web login with simplified parameters
Connect-PnPOnline -Url $siteUrl ` Connect-PnPOnline -Url $siteUrl `
-UseWebLogin ` -UseWebLogin `
-ErrorAction Stop ` -ErrorAction Stop `
-WarningAction SilentlyContinue ` -WarningAction SilentlyContinue
-RetryCount 3 `
-RetryWait 3 `
-Timeout 300
Start-Sleep -Seconds 2 # Give the web login time to complete Start-Sleep -Seconds 2 # Give the web login time to complete