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:
parent
30fa43ab12
commit
6a36255b29
@ -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;
|
||||
|
||||
@ -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'
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user