testing new script

This commit is contained in:
poslop
2025-02-13 11:16:47 -06:00
parent 7857db2059
commit 1159cd4a74

View File

@@ -76,14 +76,12 @@ ForEach ($computer in $ComputerName)
Continue Continue
} }
If ($PSCmdlet.ShouldProcess($account)) { Try {
Try { $profile.Delete()
$profile.Delete() Write-Host "Profile deleted successfully" -ForegroundColor Green
Write-Host "Profile deleted successfully" -ForegroundColor Green } Catch {
} Catch { Write-Host "Error during delete the profile" -ForegroundColor Red
Write-Host "Error during delete the profile" -ForegroundColor Red }
}
}
} }
} }