Support
 
Phone Live Chat
 
Support
 
US: +1 888 720 9500
US: +1 800 443 6694
Intl: +1 925 924 9500
Aus: +1 800 631 268
UK: 0800 028 6590
CN: +86 400 660 8680

Direct Inward Dialing: +1 408 916 9393

 
 
 
 
 
Knowledge Base

How to execute a PowerShell script upon successful AD user creation or modification using ADManager Plus.

Objective: To run a PowerShell script using ADManager Plus

Solution:

ADManager Plus allows you to execute custom PowerShell scripts upon successful Active Directory (AD) user creation or modification.

Steps to add a custom PowerShell script to be executed upon successful user creation or modification:

  1. Logon to ADManager Plus and navigate to the Management tab.
  2. Under the User Management section, click on User Creation Templates.
  3. Click on Create New Template and enter a suitable Template Name and Description.
  4. Select the desired Domain.
  5. Click on the Custom Attributes tab.
  6. Select the Run custom script on successful user creation option.
  7. In the text field that appears below the Script Command, specify the location of your PowerShell script.
  8. Following are the ways in which you can specify the script location:
    1. PowerShell C:\dir1\scr.ps1 %userName%
    2. PowerShell C:\dir~1\scr.ps1 %userName%
    3. PowerShell scr.ps1 %userName%
  9. Click on Save.
  10. Click on Save Template.
  11. To use this template,
    1. In single user creation, select it using the Selected Template option.
    2. For bulk user creation, specify this template's name under the TemplateName header in the CSV file that contains the details for bulk user creation via ADManager Plus.

Note:

You can also run the custom script as a:

  1. VBScript using the cscript C:\dir1\scr.vbs%userName% format.
  2. Batch file using the scr.bat format (or scr.cmd format).

Ensure that the path to the script file should not contain spaces if you are using naming formats like %userName%". In case you wish to use spaces in the path name or script name, use the '~' symbol to indicate spaces, in order to avoid erroneous results.

For executing custom scripts upon successful user modification, click the User Modification templates in the AD Mgmt tab, and follow the steps mentioned above.

 

Request Support

Need further assistance? Fill this form, and we'll contact you rightaway.

  • Name
  • Email*
  • Phone Number
  • Country
  • Problem Description
  •  
    By clicking 'Submit', you agree to processing of personal data according to the Privacy Policy.
  •  

Select a language to translate the contents of this web page:

ADManager Plus Trusted By

The one-stop solution to Active Directory Management and Reporting
Email Download Link