Login | |
|
 |
RE: case sensitive - 6/15/2006 1:22:12 AM
|
|
 |
|
| |
ebgreen
Posts: 5246
Score: 31
Joined: 7/12/2005
Status: offline
|
Dim OutPutFile Dim FileSystem Dim Users Dim Computers Set FileSystem = WScript.CreateObject("Scripting.FileSystemObject") Set OutPutFile = FileSystem.CreateTextFile("Test.txt", True) set objComputers = getobject("LDAP://ou=XPComputers,ou=Towson,dc=naptg,dc=com") for each oComputer in objComputers Computers = oComputer.cn set objUsers = getobject("LDAP://ou=Users,ou=Towson,dc=naptg,dc=com") for each oUser in objUsers Users = oUser.sAMAccountName & "-xp" If UCase(Users) = UCase(Computers) Then OutPutFile.writeline Computers & " can be moved." wscript.echo Computers Else 'OutPutFile.writeline "Error on: " & Computers End If Next Next
_____________________________
"... when you are good and crazy, oooh, oooh, oooh, the sky is the limit!" - The Tick Goog places to start:http://www.visualbasicscript.com/m_24727/tm.htm http://www.visualbasicscript.com/m_47117/tm.htm
|
|
| |
|
|
|
 |
RE: case sensitive - 6/15/2006 1:57:30 AM
|
|
 |
|
| |
ebgreen
Posts: 5246
Score: 31
Joined: 7/12/2005
Status: offline
|
If by getting paid well you mean by this site, then I am paid very well. I get answers to my questions when I need them and I get a sense of fulfillment from participating in an enjoyable community. That is payment enough. As for your VBScript question. When you use a For Each construct, here is what you are really syaing: For Each oUser In objUsers blah blah blah Next Take the collection objUsers and go through it one item at a time. For each item, assign that item to the variable oUser then do blah, blah, blah. Does that clear it up for you?
_____________________________
"... when you are good and crazy, oooh, oooh, oooh, the sky is the limit!" - The Tick Goog places to start:http://www.visualbasicscript.com/m_24727/tm.htm http://www.visualbasicscript.com/m_47117/tm.htm
|
|
| |
|
|
|
|
|