split in pwsh, not gh action (#3065)

Couldn't figure out why the inputs in my local purges weren't working.
It's because we split the input in gh, not in powershell.
This commit is contained in:
Keepers 2023-04-10 16:41:38 -06:00 committed by GitHub
parent 30fa43ab12
commit 6a36255b29
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 8 additions and 0 deletions

View File

@ -618,6 +618,10 @@ function Purge-Items {
Write-Host 'Authenticating with Exchange Web Services ...'
$global:Token = Get-AccessToken | ConvertTo-SecureString -AsPlainText -Force
# ensure that there are no unexpanded entries in the list of parameters
$FolderNamePurgeList = $FolderNamePurgeList | ForEach-Object { @($_.Split(',').Trim()) }
$FolderPrefixPurgeList = $FolderPrefixPurgeList | ForEach-Object { @($_.Split(',').Trim()) }
$purgeFolderParams = @{
'WellKnownRoot' = "root";
'FolderNamePurgeList' = $FolderNamePurgeList;

View File

@ -112,6 +112,10 @@ function Purge-Library {
######## MAIN #########
# ensure that there are no unexpanded entries in the list of parameters
$LibraryNameList = $LibraryNameList | ForEach-Object { @($_.Split(',').Trim()) }
$FolderPrefixPurgeList = $FolderPrefixPurgeList | ForEach-Object { @($_.Split(',').Trim()) }
# Setup SharePointPnP
if (-not (Get-Module -ListAvailable -Name PnP.PowerShell)) {
$ProgressPreference = 'SilentlyContinue'