Outlook signature over VPN

WW-6729 371 Reputation points
2023-09-06T15:40:16.94+00:00

We have a .vbs script that pulls users info from AD and then it creates Outlook signature. This .vbs script is based on .vbs script from www.codetwo.com site for Outlook signature. This .vbs script is on shared$ location (hidden). Now we have VPN users on which this script is not applying to because we applied it using GPO as Logon script. I have a couple of problems:

  • how to apply this script to VPN users using GPO
  • When I try to apply this script using GPO and Task Scheduler I have a problem with the account that is used for running the task which manifests like this: when I use %LogonDomain%%LogonUser% as user for running the task then the script runs ok with the first user that is connected to the computer. If I then sign out and sign in with another user the task is under the Task Scheduler but it has previous user under run option and it won’t run again with the new user so the new user won’t have outlook signature. I’ve tried with domain account, local service account, network service account, system and nothing seems to work.

Any help is much appreciated! If anybody has an idea how to apply Outlook signature with some other ways that would be also great.

Also I’ve tried to copy the .vbs script locally to users computer and then create Task with GPO to that .vbs locally - task is created and I can run it but nothing happens. If i run the .vbs script through CMD on users computers it runs perfectly and the signature is applied but with the task scheduler it won’t. Also, I’ve tried to start it (under task scheduler options) with csscript.exe parameters but no success.

Thank you!

Windows Server
Windows Server
A family of Microsoft server operating systems that support enterprise-level management, data storage, applications, and communications.
13,726 questions
Office Development
Office Development
Office: A suite of Microsoft productivity software that supports common business tasks, including word processing, email, presentations, and data management and analysis.Development: The process of researching, productizing, and refining new or existing technologies.
4,345 questions
Outlook Management
Outlook Management
Outlook: A family of Microsoft email and calendar products.Management: The act or process of organizing, handling, directing or controlling something.
5,825 questions
{count} votes

Accepted answer
  1. ChristyZhang-MSFT 26,066 Reputation points Microsoft External Staff
    2023-09-08T01:18:42.9+00:00

    Hi @WW-6729 ,

    Glad to hear this issue has been resolved!

    Thanks for the sharing.


    However, due to a recent update in forum policy, the question author now is not able to accept their own answers.

    So I have written a brief summary of the solution this issue. Please feel free to accept it as the answer, which would benefit others who also has similar issues in forum.

    Issue:

    Now we have VPN users on which this script is not applying to because we applied it using GPO as Logon script. How to apply Outlook signature for them?

    Solution:

    I've managed to solve this problem like this:

    • I have used Computer GPO to copy .vbs script to users computers
    • I have used Computer GPO to create Task Scheduler - Scheduled Task (At least Windows 7)
    • under Security Options|When running the task, use the following user account, set "BUILTIN\Users"
    • select "Run with highest privileges"
    • at Trigger tab, Begin the task: "At log on", Settings: "Any user"
    • at Actions tab, choose Start a program, under Program/Script: enter the path where did you copy the .vbs script to user computer (e.q. %systemdrive%\script\somescript.vbs)
    • choose other options as they suit you
    • Apply this GPO to Computers or Authenticated Users
    0 comments No comments

3 additional answers

Sort by: Most helpful
  1. Deleted

    This answer has been deleted due to a violation of our Code of Conduct. The answer was manually reported or identified through automated detection before action was taken. Please refer to our Code of Conduct for more information.


    Comments have been turned off. Learn more

  2. WW-6729 371 Reputation points
    2023-09-06T20:26:49.7966667+00:00

    Hi Muhammad,

    thank you for your time.

    If I use .vbs script during startup, how it will contact AD and pull all the necessary information because computer is still not connected to the VPN. Only after VPN connection computer has access to the DC.

    I've already used SYSTEM account, but that account does not have network permissions and my script is on shared folder which is network location so this doesn't work.

    0 comments No comments

  3. WW-6729 371 Reputation points
    2023-09-07T11:18:18.6266667+00:00

    Hello,

    I've managed to solve this problem like this:

    • I have used Computer GPO to copy .vbs script to users computers
    • I have used Computer GPO to create Task Scheduler - Scheduled Task (At least Windows 7)
    • under Security Options|When running the task, use the following user account, set "BUILTIN\Users"
    • select "Run with highest privileges"
    • at Trigger tab, Begin the task: "At log on", Settings: "Any user"
    • at Actions tab, choose Start a program, under Program/Script: enter the path where did you copy the .vbs script to user computer (e.q. %systemdrive%\script\somescript.vbs)
    • choose other options as they suit you
    • Apply this GPO to Computers or Authenticated Users

    Best regards!


Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.