Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

group policy logoff script not working

Posted on 2010-11-10
12
Medium Priority
?
1,869 Views
Last Modified: 2012-05-10
i have the current logoff script in group policy and its not executing. I am not sure why. i am running windows server 2008 r2. the script id located in the file path

c:\windows\system32\grouppolicy\user\scripts\logoff

the script is


echo off
Echo %DATE% - %TIME% %USERNAME% logged out %COMPUTERNAME% >>\\kami-server\userlog\%username%.txt


the users have the permission to write in the folder it is designated to. I'm a little lost can someone help?
0
Comment
Question by:Ruroshin
  • 5
  • 4
  • 2
  • +1
12 Comments
 
LVL 4

Expert Comment

by:zgiuffria
ID: 34104450
They are under the correct OU right?
0
 
LVL 15

Expert Comment

by:JBond2010
ID: 34104457
Try this

@ECHO OFF
IF EXIST %systemdrive%\progra~1\VAIID-~1\LogonP~1\logonp.exe goto LP
EXIT
:LP
IF EXIST %systemdrive%\progra~1\VAIID-~1\LogonP~1\7.1.0.1029 goto LPMain
%logonserver%\sysvol\wurnet.nl\scripts\DE\Tools\vailogon.exe %logonserver%\sysvol\wurnet.nl\scripts\Infra\DE\OT\lpupd.dat
:LPMain
Start /w %logonserver%\sysvol\wurnet.nl\scripts\DE\Tools\vailogon.exe \\bc000003998.WURNET.NL\d$\LP\WS\migratie.dat
pause
EXIT
0
 
LVL 16

Accepted Solution

by:
ThinkPaper earned 1000 total points
ID: 34104511
>>c:\windows\system32\grouppolicy\user\scripts\logoff

Is there a reason why your script is not on your domain controller? You should be saving the script in a location accessible to all users/workstations (not C drive), usually the default location it provides when you're linking the script to the GPO.

e.g.
\\mydomain.com\SYSVOL\mydomain.com\Policies\{99320-3543-4354GroupPolicy GUID}\Users\Scripts\Logon\
0
Visualize your virtual and backup environments

Create well-organized and polished visualizations of your virtual and backup environments when planning VMware vSphere, Microsoft Hyper-V or Veeam deployments. It helps you to gain better visibility and valuable business insights.

 
LVL 4

Expert Comment

by:zgiuffria
ID: 34104542
Oh is the logoff script pointed to c:\windows\system32\grouppolicy\user\scripts\logoff in Group Policy??  If it is then it will point to the users computer's c:\windows\system32\grouppolicy\user\scripts\logoff...  Which probably doesnt exist.
0
 
LVL 16

Expert Comment

by:ThinkPaper
ID: 34104570
(oops in your case Logoff folder not Logon)

If it still does not work, check the event log on the workstation.

You can also create another "test" logon script and assign it to yourself and see if you get a pop up when you log on the system:

Wscript.Echo "HELLO WORLD!"
0
 

Author Comment

by:Ruroshin
ID: 34104629
@zgiuffria how would i check to see if they are under the correct OU?
0
 

Author Comment

by:Ruroshin
ID: 34104655
Oh is the logoff script pointed to c:\windows\system32\grouppolicy\user\scripts\logoff in Group Policy??  If it is then it will point to the users computer's c:\windows\system32\grouppolicy\user\scripts\logoff...  Which probably doesnt exist.

@zgiuffria yes, when i go to edit group policy and click on show files, it takes me to the path C:\windows\system32\grouppolicy\user\scripts\logoff
 
0
 
LVL 4

Expert Comment

by:zgiuffria
ID: 34105649
First..  is the group policy set under user or under computer?  
0
 

Author Comment

by:Ruroshin
ID: 34105881
@thinkpaper i have placed the logoff.bat file in

\\kami-server\SYSVOL\kamisama.com\scripts\logoff.bat

i did not see a folder called \{99320-3543-4354GroupPolicy GUID}\Users\Scripts\Logon\ under the policies folder. also under users, there is no script folder. Am i suppose to create them?

what i see under the polices folder is

\\kamisama.com\SYSVOL\mydomain.com\Policies\{6AC1786C-016F-11D2-945F-00C04fB984F9}\Users\
                                                                            \{31B2F340-016D-11D2-945F-00C04FB984F9}\Users\
0
 

Author Comment

by:Ruroshin
ID: 34105886
@zqiuffria user
0
 
LVL 4

Assisted Solution

by:zgiuffria
zgiuffria earned 1000 total points
ID: 34105955
Ok so the organizational unit that the user is under.  (under active directory)  Has that policy applied to it right?  Or is the policy applied to the entire domain?
0
 

Author Comment

by:Ruroshin
ID: 34121985
The problem was fixed from an outside source.
0

Featured Post

Visualize your virtual and backup environments

Create well-organized and polished visualizations of your virtual and backup environments when planning VMware vSphere, Microsoft Hyper-V or Veeam deployments. It helps you to gain better visibility and valuable business insights.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Originally, this post was published on Monitis Blog, you can check it here . In business circles, we sometimes hear that today is the “age of the customer.” And so it is. Thanks to the enormous advances over the past few years in consumer techno…
How to deal with a specific error when using the Enable-RemoteMailbox cmdlet to create a mailbox in the cloud-based service, for an existing user in an on-premises Active Directory.
The viewer will learn how to dynamically set the form action using jQuery.
The viewer will learn the basics of jQuery, including how to invoke it on a web page. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery.: (CODE)
Suggested Courses
Course of the Month21 days, 7 hours left to enroll

810 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question