0 votes

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

0 votes
by (216k points)

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

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

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

So this works for us however we would like to add to check if the last group is at 3 users we would like to send a seperate email but would still like all the above to continue to happen the way it is.

asked Mar 2, 2022 by Keonip (160 points)
0 votes
1 answer

Is there a way to receive an email if a FAILED operation status is logged to Logging?

asked Jun 29, 2016 by casey.cochran (20 points)
3,351 questions
3,052 answers
7,791 comments
545,079 users