added exclusion logic

This commit is contained in:
poslop
2025-02-10 10:15:17 -06:00
parent 2f54d51b59
commit b540653fc3

View File

@@ -19,6 +19,7 @@ Get-WmiObject Win32_UserProfile | :Loop ForEach-Object {
if ($item -eq $userName) {
continue Loop
}
}
# Get the last logon time for the local user
$userLogon = Get-WmiObject -Class Win32_NetworkLoginProfile -Filter "Name='$domainName\\$userName'" | Select-Object -Property LastLogon