February 22 2011

Copy AD group membership from one group to another



----------------------------------------------------------------------------
I use a maximum of one Google Ad per post to help offset some of my blog hosting costs.

----------------------------------------------------------------------------

Here is a good VB script for copying the group membership from one Active Directory group to another:
 
strSGroupDN = InputBox ("Enter the DN of Source Group" & VBCRLF &_
vbcrlf& _
vbcrlf& _
"e.g. CN=Source Group,OU=Users,DC=NWTraders,DC=com")
strDGroupDN = InputBox ("Enter the DN of Destination Group" & VBCRLF &_
vbcrlf& _
vbcrlf& _
"e.g. CN=Destination Group,OU=Users,DC=NWTraders,DC=com")
set dicSeenGroupMember = CreateObject("Scripting.Dictionary")
set objDGroup = GetObject("LDAP://" & strDGroupDN)
DisplayMembers "LDAP://" & strSGroupDN, dicSeenGroupMember
Function DisplayMembers (strGroupADsPath, dicSeenGroupMember)
set objGroup = GetObject(strGroupADsPath)
for each objMember In objGroup.Members
objDGroup.Add("LDAP://" & objMember.distinguishedName)
next
End Function
MsgBox "Group Members have been copied to Destination Group"

Quotation marks are not required when entering values into the input boxes, even if your DN has spaces in it.
 
 



----------------------------------------------------------------------------
I use a maximum of one Google Ad per post to help offset some of my blog hosting costs.

----------------------------------------------------------------------------

December 31 2010

Adding photos in Lync 2010

There are a number of ways for users to have photos in Lync 2010 but my preference is to store them in Active Directory because they can then be reused by Sharepoint, Exchange / Outlook and other applications.

This is a quick post about the easiest and cheapest way I have found to do this. I’m assuming that you already have your user photos.

Firstly, obtain and install Picture Resizer from here. I used the following options “-o -f96x96 -q100”. This meant that I can easily right-click on a user photo and have it resized to 96 x 96 while maintaining photo quality. This still results in image size reduction, which we are aiming to have well under 30KB to avoid bloating the AD database.


Right-click resize to 96 x 96
Right-click resize to 96 x 96


Next, install a piece of software by a guy named OliD that extends the Active Directory Users and Computers MMC with two tabs on the user properties page – from here. Read the installation instructions can be found in the .zip file.

Once installed you will have a Photo tab in ADUC. Select your newly resized photos and add them to to the thumbnail section.


Photo tab
Photo tab


More useful info here and here.