added exclusion logic
This commit is contained in:
@@ -18,6 +18,7 @@ Get-WmiObject Win32_UserProfile | :Loop ForEach-Object {
|
|||||||
foreach ($name in $excludedProfiles) {
|
foreach ($name in $excludedProfiles) {
|
||||||
if ($item -eq $userName) {
|
if ($item -eq $userName) {
|
||||||
continue Loop
|
continue Loop
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
# Get the last logon time for the local user
|
# Get the last logon time for the local user
|
||||||
|
|||||||
Reference in New Issue
Block a user