# Force enrollment using logon script The *Force enrollment using a login script* feature, when enabled, will force unenrolled users logging into their Windows desktop to complete enrolling for the authenticators enabled for them in ADSelfService Plus. ![Forcing enrollment via the login script in ADSelfService Plus](https://www.manageengine.com/products/self-service-password/help/admin-guide/Configuration/Admin-Tools/../../images/force-enrollment-via-login-script.png) You can achieve this by configuring schedulers to force unenrolled users to complete enrollment. These schedulers will periodically scan your AD for unenrolled users and associate their accounts with a logon script. This script will prompt users to enroll whenever they log in to their machines. Here's how it works: - When users log in to their Windows machines, ADSelfService Plus will show an alert asking users to enroll for password self-service. - If required, you can prevent users from closing the alert, launching other applications, or clicking any part of their Windows desktop until they complete enrollment. - Users must click on the **Enroll Now** button and enroll with ADSelfService Plus to make the pop-up message disappear. - If enrollment is mandated, users will regain access to their machines only after successful enrollment. ## Steps for forcing enrollment using a logon script 1. Log in to the ADSelfService Plus web console with admin credentials. 2. Navigate to **Configuration > Administrative Tools > Quick Enrollment** and click **Force Enrollment using Logon Script.** 3. Enter a **Scheduler Name** and **Description.** 4. Select the policy that applies to the users for whom you want to force enrollment. 5. Enter the name you want to be displayed for the Window, in the **Window Title** field. 6. Enter the message to be displayed to the users regarding mandatory enrollment, in the **Window Content** field. 7. Enter the text for the click-to-action button in the Enroll Button field. 8. Leave the **Cancellation Button** unchecked if you want to force users to enroll when they log in to their machine. If cancellation is enabled, users can close the logon script and access their machine without completing the enrollment process. However, they will be prompted to enroll when they log in to ADSelfService Plus. If you want to give your users the option to skip enrollment, enable the **Cancellation Button** option and customize the click-to-action text accordingly. > **Important:** If the user account logging into the Windows machine has been blocked in ADSelfService Plus, the force enrollment window will not be shown to them. They will be prompted to enroll when their account is unblocked and they log in to ADSelfService Plus. 9. Schedule the frequency to which force enrollment logon script automatically applies to newly added Active Directory users. 10. Click **Save**. ![logonscript](https://www.manageengine.com/products/self-service-password/help/admin-guide/Configuration/Admin-Tools/../../images/logon-script.png) > **Important:** > > 1. By default, the logon script file (the default location is ** 2. ADSelfService Plus will stop showing the force enrollment alert during login once users finish the enrollment process. > 3. The user account configured in ADSelfService Plus' Domain Settings should have read/write permission over the script path and the permission to copy the script file to the SYSVOL folder in the domain controller. If the required permissions are not granted or there's an issue that prevents the script file from being copied to the SYSVOL folder, make sure you manually copy and paste the script file to the SYSVOL folder. ## Configuring forced enrollment of users with ADSelfService Plus ADSelfService Plus allows you to enforce enrollment only for a particular set of users instead of enforcing it for all users in a self-service policy. All you need to do is manually add an entry in the **ADSelfService_Enroll.hta** file and then configure the logon script to a particular OU through Group Policy. This will enforce the enrollment only for those users who are within the specified OU. ### Steps to be followed in ADSelfService Plus 1. Navigate to the \bin folder (the default location is ** Group Policy Management**. 2. Expand the **Domains** tree, right-click the desired **domain** or **OU**, and select **Create a GPO in this domain and Link it here**. 3. The *New GPO* dialog box is displayed. Enter a **Name** for the GPO and click **OK**. ![enrollmentReminder](https://www.manageengine.com/products/self-service-password/help/admin-guide/Configuration/Admin-Tools/../../images/enrollment-reminder-steps-01.png) 4. Find the newly created GPO under the domain or OU that you created in the above step, right-click it, and select **Edit**. ![enrollmentReminder](https://www.manageengine.com/products/self-service-password/help/admin-guide/Configuration/Admin-Tools/../../images/enrollment-reminder-steps-02.png) 5. In the Group Policy Management Editor that opens, go to **User Configuration > Policies > Windows Settings > Scripts (Logon/Logoff)**, then double-click on **Logon** displayed on the right pane. ![enrollmentReminder](https://www.manageengine.com/products/self-service-password/help/admin-guide/Configuration/Admin-Tools/../../images/enrollment-reminder-steps-03.png) 6. In the Logon Properties window that opens, click **Show Files**. A folder whose name ends in *User\Scripts\Logon\* is displayed. ![enrollmentReminder](https://www.manageengine.com/products/self-service-password/help/admin-guide/Configuration/Admin-Tools/../../images/enrollment-reminder-steps-04.png) 7. Copy your logon script, in our case, the **ADSelfService_Enroll.hta** file from \bin (the default location is ** **Important:** Replace with the location of the **ADSelfService_Enroll.hta** file (the default location is **