Skip to content
View in the app

A better way to browse. Learn more.

MSFN

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

How to select id and username from ads

Featured Replies

hi,

I look for a solution how to select the user out of the ads like this:

s12345(login-name);firstname secondname

s23456(login-name);firstname secondname

second and firstname can be changed

hope u understand me and can help. I am already infomred about the 2k3 software like ldifde or DSQUERY but i dont get it....

cu later

It is not exactly what you asked for but i was not sure on how to do it like that.

I have made a script with the help of technet :lol:

Save the code in a file called export.vbs or something.

'Global variables
Dim oContainer
Dim OutPutFile
Dim FileSystem
'Initialize global variables
Set FileSystem = WScript.CreateObject("Scripting.FileSystemObject")
Set OutPutFile = FileSystem.CreateTextFile("export.txt", True)
Set oContainer=GetObject("LDAP://OU=flappie,DC=contoso,DC=com")
'Enumerate Container
EnumerateUsers oContainer
'Clean up
OutPutFile.Close
Set FileSystem = Nothing
Set oContainer = Nothing
WScript.Echo "Finished"
WScript.Quit(0)
Sub EnumerateUsers(oCont)
Dim oUser
For Each oUser In oCont
Select Case LCase(oUser.Class)
Case "user"
If Not IsEmpty(oUser.distinguishedName) Then
OutPutFile.WriteLine "dn: " & oUser.distinguishedName
End If
If Not IsEmpty(oUser.userPrincipalName) Then
OutPutFile.WriteLine "UserPrincipalName: " & oUser.userPrincipalName
End If
If Not IsEmpty(oUser.sAMAccountName) Then
OutPutFile.WriteLine "Username: " & oUser.sAMAccountName
End If
If Not IsEmpty(oUser.name) Then
OutPutFile.WriteLine "name: " & oUser.Get ("name")
End If
Case "organizationalunit", "container"
EnumerateUsers oUser
End Select
OutPutFile.WriteLine
Next
End Sub

And it will show the result in the textfile export.txt like this:

dn: CN=John Smith,OU=Flappie,DC=contoso,DC=com
UserPrincipalName: jsmith@contoso.com
Username: jsmith
name: John Smith

  • Author

hi, thats nice. but later I want to insert it in a mysql database where I want to part it through a ',' or a ';'. perhaps u know a other solution. that my main target, to get the information about userid and name in a db :)

hi, thats nice. but later I want to insert it in a mysql database where I want to part it through a ',' or a ';'. perhaps u know a other solution. that my main target, to get the information about userid and name in a db :)

Í'll try :P

Here try this one, the code:

'Global variables
Dim oContainer
Dim OutPutFile
Dim FileSystem
'Initialize global variables
Set FileSystem = WScript.CreateObject("Scripting.FileSystemObject")
Set OutPutFile = FileSystem.CreateTextFile("export3.txt", True)
'change the domain and OU to match yours ofcource;-)
Set oContainer=GetObject("LDAP://OU=flappie,DC=contoso,DC=com")
'Enumerate Container
EnumerateUsers oContainer
'Clean up
OutPutFile.Close
Set FileSystem = Nothing
Set oContainer = Nothing
WScript.Echo "Finished"
WScript.Quit(0)
Sub EnumerateUsers(oCont)
Dim oUser
For Each oUser In oCont
Select Case LCase(oUser.Class)
Case "user"
If Not IsEmpty(oUser.sAMAccountName) Then
OutPutFile.Write oUser.sAMAccountName & ";"
End If
If Not IsEmpty(oUser.name) Then
OutPutFile.WriteLine oUser.Get ("name")
End If
Case "organizationalunit", "container"
EnumerateUsers oUser
End Select
OutPutFile.WriteLine
Next
End Sub

The result:

jdoe;Jane Doe

jsmith;John Smith

  • Author

I am a little bit fascinated by your skills. thats excatly what I ve been looking for such a long time. thank u.

now I only have to make some small changes but I ll try it at first allone.

Create an account or sign in to comment

Recently Browsing 0

  • No registered users viewing this page.

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.