1
0
mirror of https://github.com/jaapbrasser/SharedScripts.git synced 2025-12-24 21:51:38 +02:00

Changed error property to message property 📧

This commit is contained in:
Jaap Brasser
2020-05-11 09:20:04 +02:00
parent 84fbd3a722
commit 079ba53a95

View File

@@ -168,7 +168,7 @@ $ListOfFolders | ForEach-Object {
# If no matching samaccountname is found this code is executed and displayed
if (!($ADResult)) {
$HashProps = @{
'Error' = 'Account does not exist and has a home folder'
'Message' = 'Account does not exist and has a home folder'
'FullPath' = $_.FullName
}
if ($FolderSize) {
@@ -197,7 +197,7 @@ $ListOfFolders | ForEach-Object {
# If samaccountname is found but the account is disabled this information is displayed
} elseif (([boolean]((-join $ADResult.Properties.useraccountcontrol) -band 2))) {
$HashProps = @{
'Error' = 'Account is disabled and has a home folder'
'Message' = 'Account is disabled and has a home folder'
'FullPath' = $_.FullName
}
if ($FolderSize) {
@@ -222,7 +222,7 @@ $ListOfFolders | ForEach-Object {
# Folders that do have active user accounts are displayed if -DisplayAll switch is set
} elseif ($ADResult -and $DisplayAll) {
$HashProps = @{
'Error' = $null
'Message' = 'Account is active'
'FullPath' = $_.FullName
}
if ($FolderSize) {