You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
9. In the **Start in (optional)** field, type the location (**%SystemDrive%\\Scripts\\**) of the script file.
98
98
10. On the **Conditions** tab, select the **Start only if the following network connection is available** option, select **Any connection**, and then select **OK**.
99
99
11. Log off, and then log back on to the device to run the scheduled task.
100
100
101
-
#### Workaround 3: Create a scheduled task for Microsoft VPN Client EventID 20225(VPN Connection Successfully established)
101
+
#### Workaround 3: Create a scheduled task for Microsoft VPN client Event ID 20225
102
102
103
-
1. Copy the script file MapDrives.ps1 to the following location:
104
-
%SystemDrive%\\Scripts\\
103
+
> [!NOTE]
104
+
> Event ID 20225 indicates that a VPN connection is successfully established.
105
+
106
+
1. Copy the script file **MapDrives.ps1** to the following location:
107
+
**%SystemDrive%\\Scripts\\**
105
108
2. In **Task Scheduler**, select **Action** > **Create Task**.
106
-
3. On the **General** tab in the **Create Task** dialog box, type a name (such as *Map Network Drives*) and description for the task.
109
+
3. On the **General** tab in the **Create Task** dialog box, type a name (such as **Map Network Drives**) and description for the task.
107
110
4. Select **Change User or Group**, select a local user or group (such as **LocalComputer\\Users**) and then select **OK**.
108
111
5. On the **Triggers** tab, select **New**, and then select **On an event** for the **Begin the task** field.
109
-
6. On the **Triggers** tab, select **Log**, and then select **Application** from the **Log** dropdown list.
110
-
7. On the **Triggers** tab, Type **RasClient** for the **Source** field.
111
-
8. On the **Triggers** tab, Type **20225** for the **Event ID** field and then select **OK**.
112
-
9. On the **Actions** tab, select **New**, and then select **Start a program** for the **Action** field.
113
-
10. Type *Powershell.exe* for the **Program/script** field.
114
-
11. In the **Add arguments (optional)** field, type the following:
12. In the **Start in (optional)** field, type the location (*%SystemDrive%\\Scripts\\*) of the script file.
117
-
13. On the **Conditions** tab, select the **Start only if the following network connection is available** option, select **Any connection**, and then select **OK**.
118
-
14. Log off, and then log back on to the device to run the scheduled task.
112
+
6. Select **Application** from the **Log** dropdown list, type **RasClient** in the **Source** field, and type **20225** in the **Event ID** field. Then, select **OK**.
113
+
7. On the **Actions** tab, select **New**, and then select **Start a program** for the **Action** field.
114
+
8. Type **Powershell.exe** for the **Program/script** field.
115
+
9. In the **Add arguments (optional)** field, type the following:
10. In the **Start in (optional)** field, type the location (**%SystemDrive%\\Scripts\\**) of the script file.
118
+
11. On the **Conditions** tab, select the **Start only if the following network connection is available** option, select **Any connection**, and then select **OK**.
119
+
12. Log off, and then log back on to the device to run the scheduled task.
0 commit comments