clean up exchangePurge output (#3009)
Get contact counts isn't working. Just comments out the create for now. --- #### Type of change - [x] 🐛 Bugfix #### Test Plan - [x] 💪 Manual
This commit is contained in:
parent
99774e754b
commit
9eb070c0bc
@ -239,7 +239,7 @@ function Get-FoldersToPurge {
|
||||
}
|
||||
|
||||
if ((IsNameMatch @IsNameMatchParams) -or (IsPrefixAndAgeMatch @IsPrefixAndAgeMatchParams)) {
|
||||
Write-Host "`nFound desired folder to purge: $folderName ($folderCreateTime)"
|
||||
Write-Host "• Found: $folderName ($folderCreateTime)"
|
||||
$foldersToDelete += $folder
|
||||
}
|
||||
}
|
||||
@ -273,7 +273,13 @@ function Empty-Folder {
|
||||
}
|
||||
|
||||
if ($PSCmdlet.ShouldProcess("Emptying $foldersToEmptyCount folders ($WellKnownRootList $FolderNameList)", "$foldersToEmptyCount folders ($WellKnownRootList $FolderNameList)", "Empty folders")) {
|
||||
Write-Host "`nEmptying $foldersToEmptyCount folders ($WellKnownRootList $FolderNameList)"
|
||||
Write-Host "`nEmptying $foldersToEmptyCount folders..."
|
||||
foreach ($folder in $FolderNameList) {
|
||||
Write-Host "• $folder"
|
||||
}
|
||||
foreach ($folder in $WellKnownRootList) {
|
||||
Write-Host "• $folder"
|
||||
}
|
||||
|
||||
# DeleteType = HardDelete, MoveToDeletedItems, or SoftDelete
|
||||
$body = @"
|
||||
@ -308,6 +314,9 @@ function Delete-Folder {
|
||||
|
||||
if ($PSCmdlet.ShouldProcess("Removing $foldersToRemoveCount folders ($FolderNameList)", "$foldersToRemoveCount folders ($FolderNameList)", "Delete folders")) {
|
||||
Write-Host "`nRemoving $foldersToRemoveCount folders ($FolderNameList)"
|
||||
foreach ($folder in $FolderNameList) {
|
||||
Write-Host "• $folder"
|
||||
}
|
||||
|
||||
# DeleteType = HardDelete, MoveToDeletedItems, or SoftDelete
|
||||
$body = @"
|
||||
@ -353,7 +362,10 @@ function Purge-Folders {
|
||||
}
|
||||
|
||||
if ($FolderPrefixPurgeList.count -gt 0 -and $PurgeBeforeTimestamp -ne $null) {
|
||||
Write-Host "Folders older than $PurgeBeforeTimestamp with prefix: $FolderPrefixPurgeList"
|
||||
Write-Host "Folders older than $PurgeBeforeTimestamp with prefix:"
|
||||
foreach ($folder in $FolderPrefixPurgeList) {
|
||||
Write-Host "• $folder"
|
||||
}
|
||||
}
|
||||
|
||||
$foldersToDeleteParams = @{
|
||||
@ -492,7 +504,7 @@ function Purge-Contacts {
|
||||
Write-Host "`nCleaning up contacts older than $PurgeBeforeTimestamp"
|
||||
Write-Host "-------------------------------------------------------"
|
||||
|
||||
# Create one seed contact which will have recent create date and will not be sweapt
|
||||
# Create one seed contact which will have recent create date and will not be swept
|
||||
# This is needed since tests rely on some contact data being present
|
||||
Write-Host "`nCreating seed contact"
|
||||
Create-Contact
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user