Published: 1/08/2018
Applies to: Cayosoft Administrator 5.X or later.
Summary: There are several automation rules in Cayosoft Administrator to provision users in bulk, for example, Text file | Create AD Users, Import SQL Data | Create AD Users, or Import Oracle Data | Create AD Users. You can customize these rules to notify managers of created users via email, and include employee login information. So that the manager can print this email and give it to a new employee on his first day of work. There are slightly different scenarios: notify the manager about each created user in a separate email, or you notify the manager about all created users in a single email.
Video Tutorial
Notify manager about each created user in an individual email
Rules Text file | Create AD Users, Import SQL Data | Create AD Users, or Import Oracle Data | Create AD Users contain Notify Manager section that can send a email notification to the manager of the newly created user. You can customize this message.
The value in the message property should be enclosed in curly braces {}. The whole text in this property is a PowerShell script, so if you have some text in quotas inside an email message or special characters, these characters must be escaped according to PowerShell standards.
If you want to compose a complex message with some scripting or HTML formatting, you can use the $message variable for string concatenation as in the example below. Note that at the end, before the last closing bracket, you need to add a call to this variable to make it appear in the email body.
Note: You can add to the email subject and message any user property value in the following format: $($FoundObject.<AD User Property>), where <AD User Property> is the LDAP name of the user property. For example: $($FoundObject.DisplayName). If you customize automation rule <AD User Property> must be added to Properties to display setting.
- In Cayosoft Administrator Console open a provisioning rule, for example, Text file | Create AD Users"
- Expand Notify Manager section
- Set Notify Manager setting to Yes
- Replace the default text in the Subject field with this one:
{"New Account Created for $($FoundObject.givenName) $($FoundObject.sn)"} |
- Replace the default text in the Message field with this one:
{ |
- Click Save Changes
As a result, for each created user, his manager will receive the following email:
Notify manager about all created users
- In Cayosoft Administrator Console open a provisioning rule, for example, Text file | Create AD Users
- Expand Notify Manager section
- Set Notify Manager setting to Yes (Send one email for created users)
- Replace the default text in the Subject field with this one:
{"New user accounts created"} |
- Replace the default text in Message field with this one:
{ $managerName = "Manager" $managerDN=($FoundObject.manager | select -Unique) if($Null -ne $managerDN){ $mgr = Get-ADUser -Identity $managerDN -Properties * -ErrorAction Ignore if($Null -ne $mgr){ $managerName = $mgr.DisplayName } } $message = "Dear $managerName<br/><br/>New user accounts have been created.<br/><br/>" $FoundObject | %{ $message += "Login Name: $($_.sAMAccountName)<br/><br/>" $message += "Password:" + [System.Security.SecurityElement]::Escape($_.Password)+ "<br/><br/>" $message += "Email: $($_.mail)<br/><br/>" $message += "<hr/><br/>" } $message } |
As a result, when every new user is created, their manager will receive the following email:
Related Articles
Customizing an automation rule or web action output email
Customizing an automation rule or web action output email – Cayosoft Help Center
Comments
0 comments
Please sign in to leave a comment.