I wrote the following testing code:
Dim array1(6)
Dim array2()
array1(0) = "a"
array1(1) = "b"
array1(3) = ""
array1(4) = "c"
array1(5) = ""
array1(6) = "d"
For i = 0 to 6
If array1(i) <> "" Then
array2(i)= array1(i)
End If
Next
For i = 0 to Ubound(array2)
If array2(i) <> ""...
Senario:
Suppose there is a remote PC named "123456w".
Here is the folder structure that I want to search:
C:\Users
\TEST001
\TEST002
\TEST002.TEMP
\TEST002.TEMP001
\TEST002.TEMP002
\TEST003
......
I want the script to return all folder...
We use vasco tokens in an enterprise environment.
The after installing VACMAN Middleware Active Directory add-in, I can assign token to AD users.
Now, I need to write a script so that when you input a AD user account name, it could output the token serial number that assigned to the user.
I...
I have managed to retrieve most of the above except: AccountExpires, objectSid.
I also want to retrieve objectGUID and vasco-token number that associated with the user account.
I was trying to retrieve some of the user account attributes from AD.
Firstly, I use: Set objUser = GetObject(strFullLDAPName)
Then I use: objUser.<Attributes> to retrieve values, where Attributes = LDAP Display Name
I was able to get some of the attribute value but not the following...
When I ran my script, I got the following error:
TEST.vbs(583, 1) Microsoft VBScript compilation error: 'loop' without 'do'
I'm sure it's complete Do...Loop structure.
Within that main Do...Loop structure, there are couple of Do...Loop structures nested, each of them is complete. Some of them...
I need to verify if a user account entered exists in AD.
One way is to go through the entire AD to find a match, which may be slow if there are 100 thousands of objects.
Is there a faster of doing this? If yes, please share your idea and codes.
Thanks PHV. Someone has advised the similar way:
Dim regEx, strRegularExpression, strInitialString, strResult, colMatches, strMatch
strInitialString="186255w,186254L,PRDCTX140,PRDCTX141,196278L,PRDCTX146,PRDCTX241,"
strRegularExpression="\d{5,6}(w|W|l|L),"
Set regEx = New RegExp
regEx.Pattern...
Assume there is a string: 186255W,186254L,PRDCTX001,PRDCTX012,196278L,PRDCTX146,PRDCTX241
I want a VBScript that can make the result as: 186255w,186254L,196278L
In another word, remove those start with "PRDCTX". Remember their positions are random.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.