Re: AD GPO Cannot run logon script



Hello SoylentGreen,

What did you add on which field to the user properties? Please post an unedited ipconfig /all from the DC/DNS and the machine.

Best regards

Meinolf Weber
Disclaimer: This posting is provided "AS IS" with no warranties, and confers no rights.
** Please do NOT email, only reply to Newsgroups
** HELP us help YOU!!! http://www.blakjak.demon.co.uk/mul_crss.htm


It is just a simple vbs script to mount a drive, here it is:

'
' MainLogon.vbs
'
' Variables Declared
'
Option Explicit
'
Dim objNetwork, objShell
Dim CheckDrive, AlreadyConnected, intCounter
Dim strDrvLetter_R, strRemotePath_R
Dim strDrvLetter_S, strRemotePath_S
Dim strDrvLetter_T, strRemotePath_T
Dim strDrvLetter_F, strRemotePath_F
Dim strDrvLetter_M, strRemotePath_M
'
' Set the Variables
'
strDrvLetter_R = "R:"
strDrvLetter_S = "S:"
strDrvLetter_T = "T:"
strDrvLetter_F = "F:"
strDrvLetter_M = "M:"
'
strRemotePath_R = "\\psw-900700\PSWPolicies"
strRemotePath_S = "\\psw-900700\PSWShared"
strRemotePath_T = "\\psw-900700\PSWData"
strRemotePath_F = "\\psw-900700\Accounting\FundAccounting"
strRemotePath_M = "\\psw-900700\Accounting\mas90"
'
Set objShell = CreateObject("WScript.Shell")
Set objNetwork = CreateObject("WScript.Network")
Set CheckDrive = objNetwork.EnumNetworkDrives()
'
' Check to see if the R: Drive is mapped.
'
On Error Resume Next
AlreadyConnected = False
For intCounter = 0 To CheckDrive.Count - 1 Step 2
If CheckDrive.Item(intCounter) = strDrvLetter_R Then AlreadyConnected
= True
Next
'
If AlreadyConnected = True Then
objNetwork.RemoveNetworkDrive strDrvLetter_R
objNetwork.MapNetworkDrive strDrvLetter_R, strRemotePath_R
objShell.Popup "Drive" & strDrvLetter_R & "Disconnected, then
connected
successfully."
'
Else
objNetwork.MapNetworkDrive strDrvLetter_R, strRemotePath_R
objShell.Popup "Drive" & strDrvLetter_R & "Connected successfully."
End If
'
'
' End of the line...
'
WScript.Quit
'
I can run this script from the local XP system and it runs just fine.

I have put the script in the c:\windows\SYSVOL\(Domian)\scripts
directory.

It also shows up in the \\(server)\netlogon directory.

I also setup the user properties to run the script and it does not.

"Meinolf Weber" wrote:

Hello SoylentGreen,

You can not link policies to the user/computer containers. You have
to link policies to OU's.

You should better design you AD structure for your needs and add OU's
for machines and users. This will help you getting a better overview.
If you leave anything at the default location you can/will also link
policies to accounts/machines where you don't like to have them, also
configure your own policies and leave the default ones on there
location and do not modify them, if you have to rollback because of
errors or policies are screwed up, you can easily go back to the
default state.

Please post the content of the login script. What kind of script do
you run, ..vbs .bat .cmd? If you link a policy to an OU for the user
or the computer you will see the policy also in the gpresult output,
either after a reboot or running gpupdate /force on the client.
Additional you can wait up to 90 minutes for autorefresh of the
policy.

Best regards

Meinolf Weber
Disclaimer: This posting is provided "AS IS" with no warranties, and
confers
no rights.
** Please do NOT email, only reply to Newsgroups
** HELP us help YOU!!! http://www.blakjak.demon.co.uk/mul_crss.htm
I am trying to setup a new server w/AD. I DO NOT have OU's and all
the users are in Users, there are just a few users. The script runs
just fine, I have tried it on the local XP workstation, so there is
no problem with the script.

I put the logon script in the default policy in the users logon.
Does not work!;(

I put it in the user properties. Does not work!;(

I created a new GPO assigned it to Domian Users. Does Not Work!;(

The script is in the proper location(s).

I have to be missing something, besides pulling my hair out.

Here is the gpresults from a test workstation:

Microsoft (R) Windows (R) XP Operating System Group Policy Result
tool v2.0 Copyright (C) Microsoft Corp. 1981-2001

Created On 10/17/2008 at 10:42:47 AM

RSOP results for OLIVE\Jo Ann Rogers on PSW-900071 : Logging Mode
------------------------------------------------------------------

OS Type: Microsoft Windows XP Professional
OS Configuration: Member Workstation
OS Version: 5.1.2600
Domain Name: OLIVE
Domain Type: Windows 2000
Site Name: Default-First-Site-Name
Roaming Profile:
Local Profile: C:\Documents and Settings\Jo Ann Rogers
Connected over a slow link?: No
COMPUTER SETTINGS
------------------
Last time Group Policy was applied: 10/17/2008 at 10:24:46 AM
Group Policy was applied from:
psw-900700.olive.headquarters.pswrehab.com
Group Policy slow link threshold: 500 kbps
Applied Group Policy Objects
-----------------------------
Default Domain Policy
The following GPOs were not applied because they were filtered out
-------------------------------------------------------------------
Local Group Policy
Filtering: Not Applied (Empty)
The computer is a part of the following security groups:
--------------------------------------------------------
BUILTIN\Administrators
Everyone
BUILTIN\Users
NT AUTHORITY\NETWORK
NT AUTHORITY\Authenticated Users
PSW-900071$
Domain Computers
USER SETTINGS
--------------
Last time Group Policy was applied: 10/17/2008 at 10:33:33 AM
Group Policy was applied from:
psw-900700.olive.headquarters.pswrehab.com
Group Policy slow link threshold: 500 kbps
Applied Group Policy Objects
-----------------------------
Default Domain Policy
The following GPOs were not applied because they were filtered out
-------------------------------------------------------------------
Local Group Policy
Filtering: Not Applied (Empty)
The user is a part of the following security groups:
----------------------------------------------------
Domain Users
Everyone
BUILTIN\Users
NT AUTHORITY\INTERACTIVE
NT AUTHORITY\Authenticated Users
LOCAL
RehabAccess


.



Relevant Pages

  • Re: Logon Scripts Acrossed VPN
    ... What does GPMC GPREsults show under the Group Policy Infrastructure Component Status for one of those machines? ... I think this error is related to computer processing rather than your logon script issue but still probably worth figuring out if there is a problem. ... Darren Mar-Elia ... > This same error seems to be on every system in my remote offices. ...
    (microsoft.public.windows.group_policy)
  • Re: Group Policy Timeout on one server in an OU.
    ... Deny Apply for the GPO that defines the login script ... On Error GoTo 0 ... Group Policy Management solutions athttp://www.sdmsoftware.com ...
    (microsoft.public.windows.group_policy)
  • Re: Local Policy Logoff/Shutdown scripts
    ... Now, I know you set the logoff/shutdown script thru the local group policy, ... Microsoft CSS Online Newsgroup Support ... | Thread-Topic: Local Policy Logoff/Shutdown scripts ...
    (microsoft.public.windows.server.sbs)
  • Re: AD GPO Cannot run logon script
    ... Well the local user script is working. ... "Meinolf Weber" wrote: ... Dim CheckDrive, AlreadyConnected, intCounter ... Microsoft Windows XP Operating System Group Policy Result ...
    (microsoft.public.windows.group_policy)
  • Re: AD GPO Cannot run logon script
    ... Dim CheckDrive, AlreadyConnected, intCounter ... I can run this script from the local XP system and it runs just fine. ... Microsoft Windows XP Operating System Group Policy Result tool ... Connected over a slow link?: ...
    (microsoft.public.windows.group_policy)