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.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

We have two on-prem domains; Domain A and Domain B. Domain A is our primary domain and syncs with Azure AD. Domain B contains accounts created for external ... user attempts to authenticate, they are only authenticating against the Domain B on-prem domain?

asked Apr 10 by awooten (60 points)
0 votes
1 answer

Hello, I'm wondering why i'am missing Domain-DNS object type. Running latest version 3.16.21906.0 (64 bit). I'm running with domain admin & adaxes service ... -custom-commands-scheduled-reports-and-scheduled-tasks-s394.htm This is my Object Type list:

asked Apr 1 by PeterS (40 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)
3,350 questions
3,051 answers
7,791 comments
545,069 users