Solved

group policy logoff script not working

Posted on 2010-11-10
12
1,767 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 250 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
Microsoft Certification Exam 74-409

Veeam® is happy to provide the Microsoft community with a study guide prepared by MVP and MCT, Orin Thomas. This guide will take you through each of the exam objectives, helping you to prepare for and pass the examination.

 
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 250 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

Ransomware: The New Cyber Threat & How to Stop It

This infographic explains ransomware, type of malware that blocks access to your files or your systems and holds them hostage until a ransom is paid. It also examines the different types of ransomware and explains what you can do to thwart this sinister online threat.  

Question has a verified solution.

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

This script can help you clean up your user profile database by comparing profiles to Active Directory users in a particular OU, and removing the profiles that don't match.
This article shows how to deploy dynamic backgrounds to computers depending on the aspect ratio of display
This tutorial will show how to configure a new Backup Exec 2012 server and move an existing database to that server with the use of the BEUtility. Install Backup Exec 2012 on the new server and apply all of the latest hotfixes and service packs. The…
The viewer will learn how to create a basic form using some HTML5 and PHP for later processing. Set up your basic HTML file. Open your form tag and set the method and action attributes.: (CODE) Set up your first few inputs one for the name and …

803 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