refactor: Simplify Connect-SharePoint by removing unsupported parameters
This commit is contained in:
parent
dacdc42716
commit
a5ba06c2bf
@ -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
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user