Hi,
Scheduled Task is very simple, just executes a Custom Command
Custom Command is a PowerShell script
$username = '%username%'
$upn = '%userPrincipalName%'
$mail = '%mail%'
$alias = '%mailNickname%'
Import-Module Adaxes
# Username Checks
if ($username -cne $username.ToLower()) {
$Context.LogMessage("Username $username is not lowercase", 'Warning')
}
# UPN checks
if ($upn -cne $upn.ToLower()) {
$Context.LogMessage("UPN $upn is not lowercase", 'Warning')
}
if ($upn -ne "$username@example.com") {
$Context.LogMessage("UPN $upn is not in format of username@example.com", 'Warning')
}
# Email checks
if ($mail -and $mail -cne $mail.ToLower()) {
$Context.LogMessage("Email $mail is not lowercase", 'Warning')
}
if ($alias -and $alias -cne $alias.ToLower()) {
$Context.LogMessage("Alias $alias is not lowercase", 'Warning')
}
I just want to combine results of the script so I can get a report of incorrectly formatted properties.
Thanks