Share via

Longon Script not working

Jesus Mejia 1 Reputation point
2022-09-08T20:21:31.087+00:00

Hello Forum,

I am trying to use a logon script but no matter what I do it doesn't work.

I tried mimicking what the instructor does, I even watched several other tutorials on YouTube but again none of the methods I watched work for me.

I do not know what the reason might be, but I am doing the following:

I create a script.bat in SYSVOL/sysvol/mydomain/scripts/

net use Y: \myDC\SharedFolder
net use G: \myDC\TestFolder

I also tried to run the script inside the DC to see if it would map the folders, but it doesn't, btw, the first time I tried to run the script it crashed my server for some reason...

Could something be preventing this script from executing?

Any suggestion will be highly appreciated!

CHEERS!

Windows for business | Windows Client for IT Pros | Storage high availability | Virtualization and Hyper-V
Windows for business | Windows Server | User experience | Other
0 comments No comments

1 answer

Sort by: Most helpful
  1. MotoX80 37,696 Reputation points
    2022-09-09T12:03:41.037+00:00

    Use gpresult to verify that the group policy has been applied.

    https://activedirectorypro.com/gpresult-tool/

    Capture stdout and stderr to verify that your script is be called and to see what messages it produces.

    net use Y: \\myDC\SharedFolder   1>>C:\Windows\Temp\LogonScript.log 2>&1  
    net use G: \\myDC\TestFolder     1>>C:\Windows\Temp\LogonScript.log 2>&1  
    

    Was this answer helpful?

    0 comments No comments

Your answer

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