Link to home
Start Free TrialLog in
Avatar of btiamson
btiamsonFlag for United Arab Emirates

asked on

Netlogon Folder is empty (no sbs_login_script.bat file)

Hi ExpertGuys,

I got newly installed SBS 2011 Std.... trying to do netdrive mapping via login script but can not find the file sbs_login_script.bat

NETLOGON share folder is empty. Please advice...

Many Thanks!
Avatar of Phiwi Moyo
Phiwi Moyo
Flag of Germany image

Are you looking at this place?

c:\windows\sysvol\sysvol\sbs1\scripts
Please check for the followings on Windows SBS 2011

1. The Netlogon service should be started
2. The Netlogon service should use the Local System account as its logon account

Physical location should be

C:\Windows\sysvol\sysvol\<GUID>\
In case the login script is gone, you can easily create one.
Example line of mapping a network drive:

net use X: \\server\share
Avatar of Rob Williams
There is no default script with SBS 2011.
The more current way to map drives would be within group policy:
User configuration | Policies | Preferences | Drive maps
ASKER CERTIFIED SOLUTION
Avatar of Rob Williams
Rob Williams
Flag of Canada image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of btiamson

ASKER

Much Appreciate all your post & help...

Can someone explain to me what is the cause and what are the normal content files of folders
"Netlogon share"  & "Sysvol share" ??

@Santasi24: I already looked at sysvol scripts folder which is likewise empty.
@Noel29: Netlogon service is Started Automatically.
@RobWill: sounds a good idea... I will check tomorrow the GPO drive mapped options
but again i wanted to resolve the login script issue as we can do a lot of things using the scripts.
like drive mapping, add network printers and so on.. note: i will give you points later.

again, thanks & will continue waiting for more replies & solution.
by the way; before i post this Q
visit useful link on logon scripts on

Batch file to map network drives for users;
http://msmvps.com/blogs/kwsupport/archive/2004/11/03/17830.aspx#38710

There is no problem using logon scripts with SBS 2011, it is just none exist in the default configuration as they did in previous versions.
You can create your script and save it to the \\ServerName\NETLOGON share located in  C:\Windows\sysvol\sysvol\<YourDomain\scripts
You then also have to either add to the user's profile, in active directory, in the "Logon script" box, the name of your script, such as  Logon.bat, or you can apply the policy using Group Policy under a different policy:
User configuration | Policies | Windows Settings | Scripts | Logon

Sorry I did not directly answer; "Can someone explain to me what is the cause and what are the normal content files of folders "Netlogon share" "
This folder is empty by default with SBS 2011.
Hi RobWill,

Thanks again for the quick response... and directly answers my Q.

So let me get this straight for the purpose of others who may have the same issue.

1. The \\ServerName\NETLOGON share folder is empty by default starting on SBS 2011.
2. I can create & save a new logon script file like SBS_Logon_Script.bat into \\ServerName\NETLOGON share folder. And start to CALL different batch files to run...

and then what? does it get process automatically when users login
or there are more steps needed to do... like what you refer above on AD?
Please clarify... so I can work on it today to test and deploy to production :)

>>"1. The \\ServerName\NETLOGON share folder is empty by default starting on SBS 2011."
Correct.  With SBS 2003 there was little batch file used to push out an .exe file that applied a lot of customizations for users. This has since been replaced by Group Policies and is no longer needed. You could add drive mappings and other options to that batch file and they would automatically run because it was already added to the user profiles.

>>"2. I can create & save a new logon script file like SBS_Logon_Script.bat into \\ServerName\NETLOGON share folder. And start to CALL different batch files to run..."
Yes you can save a batch file to the NETLOGON share. It can be named anything so long as it has a .bat, .cmd extension (you can use other extensions such as .vbs if using visual basic instead of DOS commands).

However the logon script will not run unless you either add it to the user profile or "push" it out with group policy. The method you are accustomed to requires you add the name of the logon script to the properties of each user in Active directory under the profile tab in the "Logon script" box.

Hi RobWill,

Do i really need to enter the logon script file on each users profile tab - "Logon script" box ?
There must be a work around here...

Thanks again!
Hi RobWill,

I cant find the DriveMaps form GPEDIT.MSC  on SBS 2011;
under User Configuration: i have only

Software Settings
Windows Settings
Administrative Templates

Or i am looking at different location?
Please advice...


>>"Do i really need to enter the logon script file on each users profile tab - "Logon script" box ?"
You wanted to use the old SBS method. As mentioned in my first post there are more current and efficient ways of doing so, but that is the old method.
If you want to use logon scripts you can use group policy to push them out. As shown above, that policy is located under:
User configuration | Policies | Windows Settings | Scripts | Logon

Alternatively, instead of using logon scripts you can use drive maps.
-------------------------------------------
>>"I cant find the DriveMaps form GPEDIT.MSC  on SBS 2011;
under User Configuration: i have only
  Software Settings
  Windows Settings
  Administrative Templates
Or i am looking at different location?
Please advice..."
I assume you have opened the Group Policy management Console from within Administrative tools. Under User configuration their should be Policies and Preferences. The items you show are under Policies.

This is SBS standard and not SBS Essentials is it not? i.e. you do have Exchange?


Hi RobWill,

Yes! I now prefer to use GP Pref...
I am running SBS 2011 Std.

my GPedit.msc shows the The Computer Local Policy
But I figured it out now and created a new mmc, add new Snap-In, GPO Domain Controller..,
which I can now have acess to the User configuration / Preferences / Windows Settings /DriveMaps

Will play around now.. Many Thanks for all the help! (will give you full reward points)
You don't want to use gpedit.msc !!!!! That only affects local policy, though it can be tweaked.
As mentioned you need to use Group Policy management Console from within Administrative Tools on the SBS.
I would then create a new GPO, name it something like User Customizations, and link it to the OU that contains your users. The default OU with SBS is MyBusiness\Users\SBSUsers
If you want to apply different policies to different users you can create different sub OU's (under SBSusers) such as Accounting, Sales

If you are not familiar with Group Policy, it can take a little while to catch on. Let us know if you need a hand.
By the way a policy created for PC's/Users will take about 90 minutes to be applied. You can force it from the workstation by running from a command line
gpupdate /force
Hi Robwill,

Tried creating the map network drives using the GP Preferences - DriveMaps
but doesn't applied to the workstations both XP Pro SP3 & Win 7 Pro.
Also did run "gpupdate /force" on workstations & also the server.
and even restarted PC & SBS2011 Server but still no luck.

Is there any extra steps to do?
Pls advice... thanks!
Try running on one of the PC's, preferably Win 7, from a command line:  
   gpresult  /h  c:\Temp\Results.htm
Then open c:\Temp\Results.htm  with a browser
This will create an html file of the policies applied to that PC. See if it displays your policy.
You can also try
   gpresult /r
To see a DOS version which may also show reasons why the policy is blocked.
Hi RobWill.

Thanks for still helping me...
I've generated the report and found no GP-Pref applied...
There is no actually any mentioned of Preferences from the report.

So to further test; i tried adding more settings aside from DriveMaps;
I also setup under control panel settings ->Internet Settings Homepage & Start Menu such as disable display of run command. but still not working.
I also test the Common tab and use item-level-triggering and assign to a user or OU with users under it. But no luck!

question is:
After I setup new GP-Preferences, does it get implemented to the workstation automatically.
Or there are more steps to do  like gpupdate /force or restart the client computers (or logoff & login)
Do i must reboot the server or apply gpupdate /force as well?

Pls advice...
Hi RobWill,

No need to answer above... I got it working now...
FYI: I was applying the GP-Preference onto the Domain Controller GPO.
And then I change GPO to Windows SBS User Policy.
Redo all the settings, ie, DriveMaps, Internet Settings & Start Meny => all ok now :)

Cheers,
Bong
Great. Glad to hear you have it working.
--Rob