[download id=”28″]
When you create AD user accounts through Active Directory Users and Computers, they don’t appear in the SBS Console. And therefore it is not possible to manage them from the Console.
Run this VB script to add user accounts to the SBS console. Be sure to define the OU location for your users before running the script.
The script don’t add disabled accounts.
' //*************************************************************************** ' //*************************************************************************** ' // ***** Script Header ***** ' // ' // Solution: SBS Console ' // File: AddUsersToSBSConsole.vbs ' // Author: Brian Fahrenholtz, Coretech A/S. https://blog.ctglobalservices.com ' // Purpose: Add Active Directory user accounts to the SBS Console ' // ' // Usage: AddUsersToSBSConsole.vbs ' // ' // ' // CORETECH A/S History: ' // 1.0.0 BFA 27/01/2011 Created initial version. ' // ' // Customer History: ' // ' // ***** End Header ***** ' //*************************************************************************** ' //---------------------------------------------------------------------------- ' // Main routines ' //---------------------------------------------------------------------------- ' Defines the OU location for user accounts ' Remember to define the user location before running the script ' Default adds users located in SBSUsers strSearchOU = "OU=SBSUsers,OU=Users,OU=MyBusiness,DC=SBSDomain,DC=local" ' Create the ADO Recordset Object Set rs = CreateObject("ADODB.Recordset") ' Open the Record Set based on the arguments rs.Open "<LDAP://"& strSearchOU & ">;(&(objectClass=User)(!(userAccountControl:1.2.840.113556.1.4.803:=2)));adspath;subTree", "provider=ADsDSOObject" Do Until rs.EOF 'Create an instance of a user object from AD Set oUser = GetObject(rs.Fields("adspath")) 'Update the local property cache value using the Put method oUser.Put "msSBSCreationState", "Created" 'Write the local property cache back to AD oUser.SetInfo rs.MoveNext Loop '//---------------------------------------------------------------------------- '// End Script '//----------------------------------------------------------------------------
Thanks to Jakob for providing me the code samples.
Tak meget interessant! http://www.google.dk
Hi, thanks for posting this Brian!
There are a few other steps I needed to do afterwards to repair the user account so that it behaved like a normal SBS user account. This is with SBS 2011 Standard. The problem is the user (when created in Active Directory Users and Computers) has no e-mail account and cannot access SharePoint or other SBS resources as they are not in the right security groups.
Create the user’s standard user shared directory
mkdir D:UsersShares(username)
Set NTFS permissions to give the user full control over this folder, subfolder and files. They don’t need to be the folder owner.
Assign the desired SBS role to the user
Start the SBS Console. Highlight any user.
* User Tasks > “Change user role for user accounts”
* The “Change a User Role” wizard will start.
* Change a User Role
* Select new user role
* Role Name: “Standard User”
* Replace user permissions or settings: Enable
* Next
* Select user accounts
* select the user that has “This user role no longer exists” > Add
* Change user role
* User role has been changed successfully
* Finish
This will create the user’s e-mail account and place the in the standard SBS security groups.
-Tim Miller Dyck
for sbs2011
open windows small business server 2011 stadard console
users and groups
under users, run “change user role for user account” on the right hand side
run the wizzard, its pritty straight forward
under select user accounts be sure to check the check box bottom left
“display all user accounts in active directory”
I missed the checkbox and it took me hours to figure out.
I was very happy to discover this great site. I need to to thank you for your time due to this fantastic read!
! I definitely loved every little bit of it and i also have you saved to fav to see new information in your website.
Thank you for that nice work! awesome!