From 87da4e1185fddbe9c60a4dea57c3a349650fba58 Mon Sep 17 00:00:00 2001 From: "Bobby Abellana (aider)" Date: Wed, 19 Feb 2025 15:19:36 -0800 Subject: [PATCH] refactor: Remove hardcoded `-SiteUrl` parameter from SharePoint functions --- SharePointFunctions.ps1 | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/SharePointFunctions.ps1 b/SharePointFunctions.ps1 index b792bbe..2fe4885 100644 --- a/SharePointFunctions.ps1 +++ b/SharePointFunctions.ps1 @@ -111,8 +111,7 @@ function List-XlsFiles { } function Convert-Files { - if (-not (Connect-SharePoint -SiteUrl "https://yoursite.sharepoint.com")) { - return + if (-not (Connect-SharePoint)) { } $excel = New-Object -ComObject Excel.Application @@ -141,8 +140,7 @@ function Convert-Files { } function Move-Files { - if (-not (Connect-SharePoint -SiteUrl "https://yoursite.sharepoint.com")) { - return + if (-not (Connect-SharePoint)) { } $files = Get-Content "$env:TEMP\FileList.json" | ConvertFrom-Json