From b540653fc351179c70c9b991774b1a6c243a2066 Mon Sep 17 00:00:00 2001 From: poslop Date: Mon, 10 Feb 2025 10:15:17 -0600 Subject: [PATCH] added exclusion logic --- scripts/DeleteOldProfilesNetProfile.ps1 | 1 + 1 file changed, 1 insertion(+) diff --git a/scripts/DeleteOldProfilesNetProfile.ps1 b/scripts/DeleteOldProfilesNetProfile.ps1 index 6500795..3900491 100644 --- a/scripts/DeleteOldProfilesNetProfile.ps1 +++ b/scripts/DeleteOldProfilesNetProfile.ps1 @@ -18,6 +18,7 @@ Get-WmiObject Win32_UserProfile | :Loop ForEach-Object { foreach ($name in $excludedProfiles) { if ($item -eq $userName) { continue Loop + } } # Get the last logon time for the local user