Showing posts from September, 2009

Active Directory Scripting

I was looking for a script the other day and found this post very helpful

Adding 1,000 Users to a Security Group
Demonstration script that creates a security group named Group1, and adds one thousand users (UserNo1 through UserNo10000) to that group. This script is not intended for use in a production environment.
Set objRootDSE = GetObject("LDAP://rootDSE")
Set objContainer = GetObject("LDAP://cn=Users," & _
Set objGroup = objContainer.Create("Group", "cn=Group1")
objGroup.Put "sAMAccountName","Group1"
For i = 1 To 1000
strDN = ",cn=Users," & objRootDSE.defaultNamingContext
objGroup.PutEx ADS_PROPERTY_APPEND, "member", _
Array("cn=UserNo" & i & strDN)
Thanks to Arron Parker for his writeup on the changes
Profile Changes in Windows Vista/Longhorn Serverby Aaron Parker on Friday, August 25, 2006in Windows Windows Vista and Longhorn Server introduce a number of new user profile paths and environment variables that differ from earlier versions of Windows and these changes may have an impact on scripts such as logon scripts and application install scripts. Most scripts should work correctly – VBScript scripts that use system functions to find folder paths should work as expected, however batch scripts that use environment variables or hard codes scripts will require modifications. Here’s a short run down of the changes.The following table lists the old profile path and the corresponding new path under Windows Vista/Longhorn Server:Old PathNew Path\Documents and Settings\Users\Documents and Settings\Default User or
%LOGONSERVER%\NETLOGON\Default User\Users\Default or
%LOGONSERVER%\NETLOGON\Default User.v2\Documents and Settings\\My Documents…

2008 R2 Remote Desktop Services, Web Access, Connection Broker, and Gateway Service.

So when i was tasked with allowing our top level execs to access specific resources in the event of a H1N1 out break, i figured it would be a big pain in the A**. However with the release of R2, the process was so simple i was confused as to how easy it was (easy is something im not used to).
I will post the setup process soon................