As I found out today, the enrollment email notification in the Self-Service policy emails any user account in the domain.

We have some service accounts that are just mail-enabled user accounts, I don't want the notification to get sent to these mailboxes, as the users don't have the login id for the account - they just have the mailbox attached in Outlook.

I created a scheduled task for users, and set if the Powershell script below returns true to send the email out:

if ($Context.TargetObject.IsEnrolled)
{
    $Context.ConditionIsMet = $False
}
else
{
    $Context.ConditionIsMet = $True
}

Is that the way to check if they have enrolled or not?

by (440 points)
by (1.2k points)
0

Not sure about the script, but are your service accounts in the same OU as the users? If not, just assign the Password Self Service policy to only the OUs with the users. Another thing that should work is to add all the service accounts to a group and then exclude the members of that group from the policy.

1 Answer

by (216k points)
0 votes

Hello,

Password Self-Service Enrollment notifications are sent only to the users affected by a Password Self-Service Policy. So, the best option would be just to exclude your service accounts from the Activity Scope of the Password Self-Service Policy. For example, if all your service accounts are located in certain OUs, you can exclude these OUs from the Activity Scope of the policy.

Another option can be to use Business Units. Business Units are virtual collections of Active Directory objects that are grouped based on certain common criteria. A Business Unit may include members of specific groups or children of certain containers/OUs, objects that match a specific LDAP filter or even specific objects that you can specify explicitly. So, you can group all your service accounts into a Business Unit and then exclude the whole Unit from the Activity Scope of the Policy. For more information on Business Units, see Business Unit Overview.

On how to include or exclude objects from the Activity Scope of a Password Self-Service Policy, see the 3rd step of the Configure Password Self-Service.

jiambor, thank you for your active participation, we really appreciate it!

Related questions

I have a number of custom Powershell commands that run during user onboarding, and while the Powershell script runs successfully, the Adaxes execution log for the command will ... Adaxes when this happens so the command doesn't show that it ran successfully?

asked Dec 16, 2024 by cwyant-hfg (40 points)
0 votes
1 answer

Hello, is there a way to save powershell variable to axases attribute and send it via "send email notification" in Scheduled task? for example, check if Office 2016 ... .name) installed"} ` then add $customattrib value to Send email notification. Thank you

asked Feb 13, 2020 by vheper (20 points)
0 votes
1 answer

Is it possible to get an email notification if a scheduled task fails to run, or if 1 step in the task failed? I have a scheduled task that goes through a few steps ... part was failing to send, is it possible to get an email notification if this happens?

asked Apr 30, 2018 by ScottGriff (400 points)
0 votes
1 answer

I am trying to find a way to get an hourly report on locked out user accounts to only be sent if the total amout of locked out account exceeds 10 users. Is this possible in ... a way to setup the logic to check to see how many items are returned in a report.

asked Jun 12, 2024 by Vertigo (50 points)
0 votes
1 answer

We have a 3rd party vendor that we are able to add users based on AD security groups. What I need to do is set a parameter for the number of available licenses and whenever ... the group is 495 I would like an email to trigger telling me to add more licenses.

asked Oct 12, 2022 by A_Pastor (70 points)
0 votes
1 answer