none
Group Policy Scheduled Task To Execute Remote Script

    Question

  • Hi, currently I'm having problem applying Scheduled Task in Group Policy Preferences to execute Script from the Server. So basically the scheduled task executed at domain computers pointed to network location using UNC Path. Sometimes I got error 0x1 and also 0x8007010b, I tried to use the UNC Path in the start in with and without double quotes (") and also I've tried it in the program. How to fix this problem? Thanks.
    Friday, August 28, 2015 5:46 PM

Answers

  • Hi,

    I hope that this meet your requirement. This is my example

    I put my batch file called "testmap.bat" in \\NOM-DC1\Netlogon

    -------------------------------------------------------------------------------------------------------------------

    inside the testmap.bat file:

    @echo off

    net use X: \\NOM-DC1\Shared

    Start X:

    ---------------------------------------------------------------------------------------------------------------------

    This  is my Group Policy under TEST OU

    -----------------------------------------------

    The output last run result:


    Aliyani Sabrey http://netoverme.wordpress.com

    Sunday, August 30, 2015 3:27 AM

All replies

  • can you give example for this and what was in the actions tab you execute?

    for example a batch file that contain-  net use M: \\contoso\ShareFolder


    Aliyani Sabrey http://netoverme.wordpress.com

    Saturday, August 29, 2015 7:37 AM
  • can you give example for this and what was in the actions tab you execute?

    for example a batch file that contain-  net use M: \\contoso\ShareFolder


    Aliyani Sabrey http://netoverme.wordpress.com


    When I used UNC Path in the "Program/script:", it returned "0x8007010b" and when I fill the script name (MyScript.bat) in the "Program/script:" and the UNC Path without quotes in the "Start in" ("\\SERVER\Share") it returned "0x1".
    Saturday, August 29, 2015 6:39 PM
  • Hi,

    I hope that this meet your requirement. This is my example

    I put my batch file called "testmap.bat" in \\NOM-DC1\Netlogon

    -------------------------------------------------------------------------------------------------------------------

    inside the testmap.bat file:

    @echo off

    net use X: \\NOM-DC1\Shared

    Start X:

    ---------------------------------------------------------------------------------------------------------------------

    This  is my Group Policy under TEST OU

    -----------------------------------------------

    The output last run result:


    Aliyani Sabrey http://netoverme.wordpress.com

    Sunday, August 30, 2015 3:27 AM
  • Would you please explain me why you put \\nom-dc1\Shared inside "Start in" instead of \\nom-dc1\NETLOGON? I believe \\nom-dc1\Shared is the network location that will be mapped, isn't it? And also which configuration did you use? Computer or User Configuration? Can you export and attach it here? Thanks in advance.
    Sunday, August 30, 2015 4:04 AM
  • \\nom-dc1\netlogon\ is where I put the batch file I called "testmap.bat"

    you can put into hard drive 'C:\testmap.bat' into program/script but you have to make sure the 'testmap.bat' file located in c:\ at your users' side as well..

    at the start in, sorry, it supposed to be \\nom-dc1\NetLogon instead of \\Nom-dc1\Shared

    I use "User configuration".


    Aliyani Sabrey http://netoverme.wordpress.com

    Sunday, August 30, 2015 5:45 AM
  • Did you choose "Run only when user is logged on"? I want to choose "Run whether user is logged on or not", and uncheck "Don't store password" since I'm accessing network resources, but it appears the option "don't store password" is disabled due to Windows Update, so is there any workaround to solve this issue?
    Sunday, August 30, 2015 6:18 AM
  • yes, I choose Run only when user is logged.

    Aliyani Sabrey http://netoverme.wordpress.com

    Sunday, August 30, 2015 6:45 AM
  • Thanks for your answer, it works.
    Monday, August 31, 2015 1:53 PM