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 (11.0k 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

We are planning to use Adaxes in our environment and before proceeding, we need to understand the firewall port requirements for Adaxes service to work. What are the firewall ports needed between Adaxes and AD domain controller?

asked Jan 24 by Renugopal (120 points)
0 votes
1 answer

Hello, I need to be alerted if the domain administrator account is used to log in any device. Is there a way to do it by recording the last logon time for example ? Thanks you

asked Jan 12 by zemitch (200 points)
0 votes
1 answer

We have two AD domains, DomainA and DomainB. DomainA has a service desk that needs to manage DomainB users. Logins are done through EntraID SAML. In DomainB, there is a ... provided). We don't wish to manage Azure or DomainA through Adaxes, just DomainB.

asked Nov 17, 2023 by bennett.blodinger (60 points)
0 votes
1 answer

Will it use 1 license for an Active Directory user and his azure account or 2 licenses?

asked Nov 7, 2023 by johanpr (80 points)
3,326 questions
3,026 answers
7,727 comments
544,678 users