0 votes

Hello,

is there possibility to catch the "Domain NetbiosName" of a User object? We'd like to use this for a Password Reminder eMail to the Account Owner.

Subject on "Send e-mail notification" action should look like: "Your password on %Domain NetbiosName%\%username% will expire in %adm-PasswordExpiresDaysLeft% day(s)

We found an attribute for DomainDistinguishedName (adm-DomainDN), only

Best regards Michael

by (20 points)

1 Answer

0 votes
by (14.1k points)

Hello Michael,

Yes, it is possible using a PowerShell script to send the email notification. Please, find the script below. In the script:

  • $subjectTemplate - Specifies a template for the email notification subject. In the template, the {0} placeholder will be replaced with the domain name of the account.
  • $message - Specifies the email notification message.
$subjectTemplate = @"
Your password on {0}\%username% will expire in %adm-PasswordExpiresDaysLeft% day(s)
"@ # TODO: modify me
$message = "Your account password expires in %adm-PasswordExpiresDaysLeft% day(s)" # TODO: modify me

# Get domain name
$domain = $Context.BindToObjectByDN("%adm-DomainDN%")
$domainName = $domain.Get("name")

# Build subject
$subject = [System.String]::Format($subjectTemplate, @($domainName))

# Send mail
$Context.SendMail("%mail%", $subject, $message, $NULL)

Related questions

0 votes
1 answer

Hello, We currently use a lot of business rules that act as job templates. When a matching job title is found after a user creation, it runs the business rule to ... business rule is applied so the user is at least assigned a basic access template? Thanks

asked Jun 6, 2018 by jhair (520 points)
0 votes
1 answer

On the Create User form, I'm trying to set some predefined fields to prepopulate the Last Name and Username fields. If I set just the Username field, it works fine ... changed to 'svc_@domain1' How do I predefine both fields, but keep the domain as @domain2?

asked Nov 8 by jmatthews (190 points)
0 votes
1 answer

Our Adaxes server is currently used to manage only one hybrid domain. We're looking to add a second (AAD / cloud only) managed domain, but our existing Adaxes ... scenes" without that domain and its objects being visible to our users immediately? Thanks.

asked Sep 26 by ms1 (20 points)
0 votes
1 answer

We decommissioned several child domains in our multi-domain forest. How do we unregister those domains? The normal process throws an error about not being able to talk to the missing domain.

asked Sep 19 by ashmite (510 points)
0 votes
1 answer

During installation of the Adaxes in new testing domain hosted in Azure Microsoft Entra Domain Services this error was thrown "Failed to create application partitions on the backend ... this is related to the fact this is not ordinary AD, but Azure hosted.

asked Sep 17 by KIT (960 points)
3,549 questions
3,240 answers
8,233 comments
547,826 users