Results 1 to 3 of 3

Thread: Start Up Script to hit %LOGONSERVER%

  1. #1
    gdouglass37 is offline 10+ Helpful Posts Happy to be helping others
    Join Date
    Dec 1969
    Posts
    11

    Default

    I have created a .vbs file to delete a registry key & stored it on a domain controller's SYSVOL. I have attached it to a computer startup policy. However, in the Computer Startup Script of the GPO, when I point to %LOGONSEVER%\netlogon\*.vbs, the client fails to find it. If I hardcode a specific DC, it can find it and run.
    As the LOGONSERVER variable is not "applied" until after the user logs on, I can't use that.
    Anyone have any ideas what variable I can use for the LOGONSERVER prior to logon? As our users are in a locked down environment, they can't access the registry in their user context, so a normal logon script won't work.
    Thanks!

  2. #2
    gdouglass37 is offline 10+ Helpful Posts Happy to be helping others
    Join Date
    Dec 1969
    Posts
    11

    Default

    I found a work around for this... by pointing the start up script location to the dns name for the domain, it seems to work... so instead of %LOGONSERVER% I put in \\mycompany.com\netlogon\ and it worked. At least that is not hardcoded to a specific DC name.
    So maybe not the most elegant way to do it, but problem solved for now. Will continue testing.

  3. #3
    JerryC is offline 100+ Helpful Posts! 50+ Helpful Posts
    Join Date
    Dec 1969
    Posts
    231

    Default

    ==================================
    Depending upon your situation, you may have to use the fully qualified SYSVOL path instead of the NetLogon share:

    Child Domain Example:
    \\childdomain.rootdomain.com\SYSVOL\childdomain.ro otdomain\Scripts\ScriptName

    Root domain Example:
    \\rootdomain.com\SYSVOL\rootdomain.com\Scripts\Scr iptName

    ==================================
    The GPO system will correctly resolve the path to scripts located within the GPO itself, however, there may be circumstances where you need to know the fully qualified path to that location, say for use by tools you develop internally. These 'non-GPO' system tools will need to be given the fully qualified path or would need to develop that path itself. Here is what that path should look like:

    Child Domain Example:
    \\childdomain.rootdomain.com\SYSVOL\childdomain.ro otdomain.com\Policies\[GPO_GUID]\Machine\Scripts\Startup\ScriptName

    Root domain Example:
    \\rootdomain.com\SYSVOL\rootdomain.com\Policies\[GPO_GUID]\Machine\Scripts\Startup\ScriptName

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  

Search Engine Friendly URLs by vBSEO