Wenn sie eine Liste aller disabled User aus dem AD ziehen möchten, läßt sich dies am schnellsten über den PS Befehl:
get-Mailbox | where { $_.UserAccountControl -match “AccountDisabled”}
realisieren. Mit dem AccountControl Flag lassen sich natürlich noch andere Benutzereigenschaften bearbeiten und verwenden. Hier eine Liste der entsprechenden Maskierung:
| Flag-Eigenschaft | hex | dezimal |
|---|---|---|
| SKRIPT | 0 x 0001 | 1 |
| ACCOUNTDISABLE | 0 x 0002 | 2 |
| HOMEDIR_REQUIRED | 0 x 0008 | 8 |
| KONTOSPERRUNG | 0 x 0010 | 16 |
| PASSWD_NOTREQD | 0 x 0020 | 32 |
| PASSWD_CANT_CHANGE | 0 x 0040 | 64 |
| ENCRYPTED_TEXT_PWD_ALLOWED | 0 x 0080 | 128 |
| TEMP_DUPLICATE_ACCOUNT | 0 x 0100 | 256 |
| NORMAL_ACCOUNT | 0 x 0200 | 512 |
| INTERDOMAIN_TRUST_ACCOUNT | 0 x 0800 | 2048 |
| WORKSTATION_TRUST_ACCOUNT | 0 x 1000 | 4096 |
| SERVER_TRUST_ACCOUNT | 0 x 2000 | 8192 |
| DONT_EXPIRE_PASSWORD | 0 x 10000 | 65536 |
| MNS_LOGON_ACCOUNT | 0 x 20000 | 131072 |
| SMARTCARD_REQUIRED | 0 x 40000 | 262144 |
| TRUSTED_FOR_DELEGATION | 0 x 80000 | 524288 |
| NOT_DELEGATED | 0 x 100000 | 1048576 |
| USE_DES_KEY_ONLY | 0 x 200000 | 2097152 |
| DONT_REQ_PREAUTH | 0 x 400000 | 4194304 |
| PASSWORD_EXPIRED | 0 x 800000 | 8388608 |
| TRUSTED_TO_AUTH_FOR_DELEGATION | 0 x 1000000 | 16777216 |
| PARTIAL_SECRETS_ACCOUNT | 0 x 04000000 | 67108864 |