From 05f8c1136764e876b16bbe87d990ddc707362c42 Mon Sep 17 00:00:00 2001 From: poslop Date: Thu, 13 Feb 2025 12:27:00 -0600 Subject: [PATCH] Comments and rearrange --- scripts/DeleteOldProfiles.ps1 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/DeleteOldProfiles.ps1 b/scripts/DeleteOldProfiles.ps1 index 80e788d..52bb4ab 100644 --- a/scripts/DeleteOldProfiles.ps1 +++ b/scripts/DeleteOldProfiles.ps1 @@ -97,7 +97,7 @@ ForEach ($computer in $ComputerName) } Try { - $profile.Delete() + Remove-CimInstance $profile Write-Host "Profile deleted successfully" -ForegroundColor Green } Catch { Write-Host "Error during delete the profile" -ForegroundColor Red