[x]
Posted via EE Mobile

Search, ask, and monitor your questions on the go with EE Mobile. Visit Experts Exchange from your mobile device and never be out of touch again.

Question
[x]
Attachment Details
[x]
The Solution Rating System

With so many solutions, how can you tell which solutions are most likely to help you and which ones are not? To provide you with a tool to use, we rate our solutions based on various elements that most accurately determine if a solution is a quality solution. To explain what factors affect the solution rating, here are the elements we take into consideration when formulating our solution rating.

  • The Grade of the Solution
  • The Zone Rank of the Expert Providing the Solution
  • The Number of Author and Expert Comments
  • The Number of Experts Contributing
  • The Feedback of the Community

Your Input Matters
Because of the way the system is set up, the most important variable in this equation is you. As a member of Experts Exchange, you are able to cast your vote on the quality of the solutions in regard to how complete, accurate, helpful and easy to understand each solution is. When you provide your feedback, each rating is adjusted accordingly. So, if you see a solution that has a poor rating that you think is a good solution, let us know by rating it. As you do, the rating will be adjusted and will become more accurate for other members of our site.

If you have any suggestions that you would like to make for our rating system, please ask a question in the Suggestions Zone of Community Support.

Thank you!

8.5

Terminal Service Profile Path script

Asked by lawson2305 in Active Directory, Remote Desktop/Terminal Services, Microsoft Windows Operating Systems, Microsoft Server, VB Script

Tags: Profile, vbs, terminal service profile path

We have this script that was created before I came on board and it runs automatically every day.  What I know this script does, is automatically fill in this information in the Terminal Service Profile information in AD.
Profile Path: \\SVR-AP9\Profile$\username
Terminal Services Home Folder: Map W: to  \\SVR-AP9\Profile$\username

Questions
1.  Does this script do anything else here which I do not understand from above?
2.  How can I make this only do this for a certain OU and all accounts below?

For example this does this for ALL OU's now and all accounts under the domain except in folders.
Say I have this AD setup
Domain AA
    -OU  BA
           -OU BB
                -useraccount 11
           -OU BC
    -OU  CA
            -OU CB
            -OU CC
                -useraccount 22
    -OU DA

Currently this would set this information for accounts 11 and 22.
I do not want it setting this information for anything under the BA OU and I only want it setting information for accounts under the OU CA  ONLY.  So the only account that should be affected would be 22.
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
19:
20:
21:
22:
23:
24:
25:
26:
27:
28:
29:
30:
31:
32:
33:
34:
35:
36:
37:
38:
39:
40:
'On Error Resume Next
Set oRootDSE = GetObject("LDAP://RootDSE")
Set oDomain = GetObject("LDAP://" & oRootDSE.Get("DefaultNamingContext"))
Call EnumOUs(oDomain.ADsPath)
Sub EnumOUs(sADsPath)
	Set oContainer = GetObject(sADsPath)
	oContainer.Filter = Array("OrganizationalUnit")
	For Each oOU in oContainer
'		WScript.Echo oOU.ADsPath
		EnumUsers(oOU.ADsPath)
		EnumOUs(oOU.ADsPath)
	Next
End Sub
Sub EnumUsers(sADsPath)
	Set oContainer = GetObject(sADsPath)
	oContainer.Filter = Array("User")
	For Each oADobject in oContainer
		If oADobject.Class = "user" Then
'			wscript.echo oADObject.ADsPath
			Set objUser = GetObject(oADObject.ADsPath)
			objuser.GetInfo
			SetData = 0
			if len(objuser.TerminalServicesProfilePath) = 0 then
				objUser.TerminalServicesProfilePath = "\\SVR-AP9\Profile$\" & objUser.SamAccountName
				SetData = 1
			end if
   		        if len(objuser.TerminalServicesHomeDrive) = 0 then
			   objuser.TerminalServicesHomeDrive = "W:"
			   SetData = 1
			end if
			if len(objuser.TerminalServicesHomeDirectory) = 0 then
			   objuser.TerminalServicesHomeDirectory = "\\SVR-AP9\Profile$\" & objUser.SamAccountName
			   setData = 1
			end if
	  	        If SetData = 1 Then
			   	objuser.setInfo
			end if
		End If
	Next
End Sub
[+][-]06/17/09 07:41 AM, ID: 24648738Assisted Solution

Assisted solutions are selected by the member who asked the question as a comment that contributed to their question's solution.

Start your 30-day free trial to view this Assisted Solution or ask the Experts your question.

 
[+][-]06/25/09 10:46 AM, ID: 24714042Author Comment

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]07/08/09 12:05 PM, ID: 24807054Author Comment

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]07/29/09 07:05 AM, ID: 24970306Author Comment

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]07/30/09 11:05 AM, ID: 24982653Administrative Comment

Experts Exchange has a courteous staff of administrators who help members get the most out of the website by means of administrative comments like this one.

Start your 30-day free trial to view this Administrative Comment or ask the Experts your question.

 
[+][-]07/30/09 11:06 AM, ID: 24982656Administrative Comment

Experts Exchange has a courteous staff of administrators who help members get the most out of the website by means of administrative comments like this one.

Start your 30-day free trial to view this Administrative Comment or ask the Experts your question.

 
[+][-]07/30/09 04:15 PM, ID: 24985214Accepted Solution

View this solution now by starting your 30-day free trial. Setting up your free trial is quick, easy, and secure. We will return you to this solution, unlocked, when you're done.

About this solution

Zones: Active Directory, Remote Desktop/Terminal Services, Microsoft Windows Operating Systems, Microsoft Server, VB Script
Tags: Profile, vbs, terminal service profile path
Sign Up Now!
Solution Provided By: RobSampson
Participating Experts: 2
Solution Grade: A
 
[+][-]08/12/09 02:14 PM, ID: 25083102Author Comment

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]08/12/09 03:53 PM, ID: 25083913Expert Comment

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]08/24/09 01:22 PM, ID: 25172173Author Comment

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]08/24/09 04:24 PM, ID: 25173460Expert Comment

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
 
Loading Advertisement...
20091111-EE-VQP-89 - Hierarchy / EE_QW_3_20080625