refactor: Remove hardcoded -SiteUrl parameter from SharePoint functions
This commit is contained in:
parent
a5ba06c2bf
commit
87da4e1185
@ -111,8 +111,7 @@ function List-XlsFiles {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function Convert-Files {
|
function Convert-Files {
|
||||||
if (-not (Connect-SharePoint -SiteUrl "https://yoursite.sharepoint.com")) {
|
if (-not (Connect-SharePoint)) {
|
||||||
return
|
|
||||||
}
|
}
|
||||||
|
|
||||||
$excel = New-Object -ComObject Excel.Application
|
$excel = New-Object -ComObject Excel.Application
|
||||||
@ -141,8 +140,7 @@ function Convert-Files {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function Move-Files {
|
function Move-Files {
|
||||||
if (-not (Connect-SharePoint -SiteUrl "https://yoursite.sharepoint.com")) {
|
if (-not (Connect-SharePoint)) {
|
||||||
return
|
|
||||||
}
|
}
|
||||||
|
|
||||||
$files = Get-Content "$env:TEMP\FileList.json" | ConvertFrom-Json
|
$files = Get-Content "$env:TEMP\FileList.json" | ConvertFrom-Json
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user