Forgot to un-comment the delete code
This commit is contained in:
@@ -556,7 +556,7 @@ Function Copy-ContentLibrary {
|
|||||||
if($DeleteSourceFile) {
|
if($DeleteSourceFile) {
|
||||||
try {
|
try {
|
||||||
Write-Host -ForegroundColor Magenta "Deleteing" $sourceItemFile.Name "..."
|
Write-Host -ForegroundColor Magenta "Deleteing" $sourceItemFile.Name "..."
|
||||||
#$deleteResult = $contentLibaryItemService.delete($sourceItemFile.Id)
|
$deleteResult = $contentLibaryItemService.delete($sourceItemFile.Id)
|
||||||
} catch {
|
} catch {
|
||||||
Write-Host -ForegroundColor Red "Failed to delete" $sourceItemFile.Name
|
Write-Host -ForegroundColor Red "Failed to delete" $sourceItemFile.Name
|
||||||
$Error[0]
|
$Error[0]
|
||||||
@@ -570,7 +570,7 @@ Function Copy-ContentLibrary {
|
|||||||
if($DeleteSourceFile) {
|
if($DeleteSourceFile) {
|
||||||
try {
|
try {
|
||||||
Write-Host -ForegroundColor Magenta "Deleteing" $sourceItemFile.Name "..."
|
Write-Host -ForegroundColor Magenta "Deleteing" $sourceItemFile.Name "..."
|
||||||
#$deleteResult = $contentLibaryItemService.delete($sourceItemFile.Id)
|
$deleteResult = $contentLibaryItemService.delete($sourceItemFile.Id)
|
||||||
} catch {
|
} catch {
|
||||||
Write-Host -ForegroundColor Red "Failed to delete" $sourceItemFile.Name
|
Write-Host -ForegroundColor Red "Failed to delete" $sourceItemFile.Name
|
||||||
break
|
break
|
||||||
|
|||||||
Reference in New Issue
Block a user