diff --git a/SharePointFunctions.ps1 b/SharePointFunctions.ps1 index 7d66ff9..b792bbe 100644 --- a/SharePointFunctions.ps1 +++ b/SharePointFunctions.ps1 @@ -47,14 +47,11 @@ function Connect-SharePoint { # Ignore disconnection errors } - # Use web login with additional parameters for stability + # Use web login with simplified parameters Connect-PnPOnline -Url $siteUrl ` -UseWebLogin ` -ErrorAction Stop ` - -WarningAction SilentlyContinue ` - -RetryCount 3 ` - -RetryWait 3 ` - -Timeout 300 + -WarningAction SilentlyContinue Start-Sleep -Seconds 2 # Give the web login time to complete