How to retrieve AD and LDAP account of the person (about efficiency) accounts

Hi all

I was wondering if there is a more elegant way to search for a person and then their subsequent announcement and accounts LDAP in a script.  Here is an example of my work and maybe an expert could chime with a better / more a recommended method.

Thank you

Dim dbPerson As ISingleDbObject

Dim LDAPAccount As ISingleDbObject

Dim ADSAccount As ISingleDbObject

Dim colPersons As IColDbObject

Dim colADSAccount As IColDbObject

Dim colLDAPAccount As IColDbObject

Dim UID_Person As String

colPersons = Connection.CreateCol ("Person")

colPersons.Prototype.PutValue ("CentralAccount", UCase (accessid))

colPersons.Load)

UID_Person = colPersons (0). GetValue ("UID_Person"). String

dbPerson = Connection.CreateSingle ("person", UID_Person)

'create the db LDAP object.

colLDAPAccount = Connection.CreateCol ("LDAPAccount")

colLDAPAccount.Prototype.PutValue ("UID_Person", UID_Person)

colLDAPAccount.Load)

LDAPAccount = colLDAPAccount (0). Create()

«create the db object ADS»

colADSAccount = Connection.CreateCol ("ADSAccount")

colADSAccount.Prototype.PutValue ("UID_Person", UID_Person)

colADSAccount.Load)

ADSAccount = colADSAccount (0). Create()

Hi Daueric,

You could probably clean it up a little bit but probably not much. To be more precise, I would like to know what you're passing in this script.

Some thoughts: I'm guessing your passing the central account as accessID. Can you pass the UID instead?

You use collections where it is not necessary. For example, when getting the UID of the central account you create a collection and use value and select the first item in the collection. Instead, you could get the UID directly:

Var f As ISqlFormatter = Connection.SqlFormatter
Dim UID As String = Connection.GetSingleProperty ("person", "UID_Person", _
f.Comparison ("CentralAccount", accessid, ValType.String, CompareOperator.Equal))

Similarly, you expect a user to have several AD accounts?  If not, you must use CreateSingle (now that you have the user ID of the person) and pass a GetSingleProperty for UID such as:

Var ADO as ISingleDbObject = Connection.CreateSingle ("ADSAccount" _
Connection.GetSingleProperty ("ADSAccount", "UID_ADSAccount" _
f.Comparison ("UID_Person", UID, ValType.String, CompareOperator.Equal)))

Ditto for LDAP.

If you can be more specific on what spend you and what your goals are, I might be able to help more.

-Aaron

Tags: Dell Tech

Similar Questions

  • How to retrieve a text font, text color, the size of the text in a text layer?

    How to retrieve a text font, text color, the size of the text in a text layer?

    Copy the following code shows how to retrieve the name of the font for a text layer. (cs6 and upward, I think)

    var textProp = myTextLayer.property ("Source Text");

    textDocument var = textProp.value;

    textDocument.font;

    the following thread shows hot to launch AEGP_ExecuteSrcipt() and how to get the result back to the side C:

    http://forums.Adobe.com/message/3625857#3625857

    (he treats actually layers of text!)

  • How do I trouble and get rid of the error Code: rundll32.exe on my MacBook Pro?

    How do I trouble and get rid of the error Code: rundll32.exe on my MacBook Pro?  The heading reads as follows: of "http://Mac support1. com ".  I can't remove it from Safari.  It is also IMMEDIATELY said 'call APPLE to 1-844-335-2242 '.  I asked that this number.  Any help would be greatly appreciated.

    Choose force quit from the Apple menu, close Safari and then run it with the SHIFT key is pressed. If the message reappears, disconnect the computer from the Internet and close the tab Popup came.

    (138334)

  • How can I find and get rid of the duplicates

    How can I find and get rid of the duplicates

    Hi sinkerslider,

    I apologize for the long delay. In what app work? Looking for double .jpgs, PSD etc files. ? Also, what device and operating system are you using? Thank you very much!

    -Kathleen

  • How reinstall individual programs and users accounts after recovery of Windows 7?

    Hello

    I have Windows 7 Home Premium. I have problems, have tried all the options and want to do a recovery system of the C: drive as a last resort before taking the computer home.

    I used the Backup and Restore to back up my C: drive as a whole (including the image of the system in case where something goes wrong) on an external drive, but I've never used, backup and restore. I'm not sure if she actually re - installed programs or just moves them. I don't have a disk for my suite Office 2007 so I can't reinstall it it will be lost (unless I used the image of the system, of course).

    Can you tell me if yes or no backup and restore will actually reinstall Office, and if so, how do I do?

    Also, I have 2 user accounts on the computer. Can back up and restore reinstall all the accounts of individual users?

    Thank you for your time.

    The new computer will come with Windows (for example, Win10) preinstalled?

    Remarks/comments:

    • A restore an image.
    • An image created on the computer may not be fully compatible with computer B A.
    • The only way to do a clean install of an application is using the original installation media (unless the application is preinstalled on the computer in question).
  • How to retrieve metadata and photos in my catalog

    I have LR3 and windows 7, all my photos are already published and cataloged in their selected records, today I opened LR3 to do more work, to find that 80% of the photos are missing from their files and records have been appointed is no longer.

    All photos are always in my hard drive and when I tried to place them in LR3, they had lost all the metadata information and were published, they were in their original raw. Is it possible to retrieve and place all of the information that it was?

    There are over 7000 photos and I could never do this work again one by one, is it also a means of protection against this happening again?

    I suspect that you have opened an old copy of your catalog backup. Are you sure which catalog you are editing? You have a recent backup of your catalog on which you can base? Do not open the Catalog backup directly from its backup location!

    Beat

  • YB 45, when I down load of new emails everyone wonder if it's a spam how to stop this and letting just press the junk e-mail button

    I just down loaded TB 45 and is asking if each email is junk I have to click the no jumk button on everyone. How do I change so I only get the junk e-mail button? Thank you

    This is not sound like Thunderbird. This looks like an add-on, perhaps from an anti virus.

    Please add the troubleshooting information for your post to find troubleshooting information:

    • Open the help (or click Help three-line-icon and select)
    • Choose troubleshooting information
    • Use the copy button in the Clipboard to select them all. Do not check box "include account names!
    • Paste this into your post.
  • How to run code and to communicate between the computer and myRIO?

    Hello

    I am trying to create a colortracker using the myRIO. The system is pan tilt servo with a webcam. The project works well and is able to follow and move with the desired color. However, in order to continue the project, I want to ensure the system with another device for the perception of depth and want to use the host computer for webcam and image processing and the myrio to get signals for the servos. The idea is to connect two webcams directly to the computer usb ports and keep the myRIO connected to everything does time i.e. no wifi. Can anyone guide me as to how I would go about sending signals constantly between the computer host and myRIO?

    I advise to use Variables shared Network-Published or network stream.

    You can read about them both in the cRIO guide Developer: http://www.ni.com/pdf/products/us/fullcriodevguide.pdf

    There are also examples for both in the Finder for example LabVIEW.

  • Detail of computer Vista Business 32 lost in hurricane. How can I reinstall and activate Vista to the new computer and use the backup image to restore files and programs on the new computer?

    Home built computer with Vista installed detail. I always have backups who intend to reinstall on the machine even if the HDD or MB went bad. Full image backup was on the hard drive of withdrawal which do not damaged. Never planned to lose computer any wave of sandstorm. I reinstalled on the same computer successfully before but never tried to migrate to a new computer.  Cannot uninstall Vista from your old computer, because it was submerged in salt water and died. I am not very well informed, but I can follow directions.  Thank you.

    You don't have to worry about uninstall on the destroyed computer, because it is not usable.

    And no message is sent when you uninstall any computer anyway.

    When you perform the Activation on the new computer, if you have problems of activation to the phone option I have included and do not take the road to auto answer, but brace yourself for a real person to talk to you.

    Then you can explain what happened.

    "How to activate Vista normally and by Activation of the phone '

    http://www.Vistax64.com/tutorials/84488-activate-Vista-phone.html

    See you soon.

    p.s. Sorry missed that one.

    If you have problems with Office, contact Microsoft on this issue too.

  • How to discern autonomous and lightweight to "see the version.

    It's 'see the version' for Aironet 1240AG.

    He was LightweightAP.

    But now, I guess it's AutonomousAP, because I have active autonomous.

    So how discerm?

    Is independent "flash:/c1240-k9w7-mx.124-21a.JY/c1240-k9w7-mx.124-21a.JY"?

    = ~ = ~ = ~ = ~ = ~ = ~ = ~ = ~ = ~ = ~ = ~ = PuTTY connect 2010.08.25 18:10:15 = ~ = ~ = ~ = ~ = ~ = ~ = ~ = ~ = ~ = ~ = ~ =.
    See the version
    Software Cisco IOS, C1240 Software (C1240-K9W7-M), Version 12.4 JY (21 a), RELEASE SOFTWARE (fc1)
    Technical support: http://www.cisco.com/techsupport
    Copyright (c) 1986-2010 by Cisco Systems, Inc.
    Updated Thursday, April 28, 10 11:14 by prod_rel_team

    ROM: Bootstrap program is C1240 boot loader
    BOOTLDR: Version of bootloader (BOOT-C1240-M) C1240 12.3 (7) JA1, RELEASE SOFTWARE (fc1)

    MCBR_AP01 uptime is 1 day, 22 hours, 58 minutes
    System to regain the power ROM
    System image file is "flash:/c1240-k9w7-mx.124-21a.JY/c1240-k9w7-mx.124-21a.JY".

    This product contains cryptographic features and is under the United States
    States and local laws governing the import, export, transfer and
    use. Delivery of Cisco cryptographic products does not imply
    third party approval to import, export, distribute or use encryption.
    Importers, exporters, distributors and users are responsible for
    compliance with U.S. laws and local countries. By using this product you
    agree to comply with the regulations and laws in force. If you are unable
    to satisfy the United States and local laws, return the product.
    -More-
    A summary of U.S. laws governing Cisco cryptographic products to:
    http://www.Cisco.com/WWL/export/crypto/tool/stqrg.html

    If you need assistance please contact us by mail at
    [email protected] / * /.

    Cisco AIR-LAP1242AG-A-K9 (PowerPCElvis) Prozesseur (revision A0) 24566K / 8192K bytes of memory.
    Card processor ID FTX1202B316
    PowerPCElvis CPU at 262 Mhz, revision number 0 x 0950
    Last reset of tension
    1 interface FastEthernet
    2 802.11 radios

    32K bytes memory simulated by flash not volatile configuration.
    Basic Ethernet MAC address: 00:1: A1:FD:54:14
    Part number: 73-9925-06
    Kit numbered PCA: 800-26579-05
    Revision number of PCA: A0
    Serial number of PCB: FOC12010GQ4
    Top Assembly part number: 800-29151-02
    Top of page the Assembly serial number: FTX1202B316
    -More revision number - top of page: A0
    Product/model number: AIR-LAP1242AG-A-K9

    Configuration register is 0xF

    Fortunately, it's actually very easy.  If the AP is loaded with a stand-alone image, it will be a k9w7 if she a CUWN image, it will be a k9w8.

  • How to add left and right margins in the topic?

    Hello

    I use RH10 under the TCS4. I create screen provisions by changing only the existing ones.

    I noticed that there is no margin / space between the border of the subject and the content in the topic inside. When I searched for that in mobile.css, I have not found any reference. When I made a component inspect on Firefox, it stressed default.css which I cannot find in my pod of setting up a project.

    How can I change it? Here is the screenshot of the question that I am referring to:

    Margins_Topics.jpg

    Please notify.

    Anthony

    This is done in the css layout. If you add a padding to div.wTopic you will get the result that you need. Don't forget to subtract any width that add you in the padding from the width of the div.wTopic or the container will become too big.

    The project manager pod displays only currently used css files by themes. You can assign css to a topic in the properties of the section? You should see all the css files in your project directory.

    Kind regards

    Willam

  • How to import xsd and use it in the transformation for mapping

    I built a xsd and you want to use the xsd to the development in BPEL Process.I imported. But I can't figure out how to proceed further. Anyone can suggest me how to import xsd and use it as it must be defined in wsdl using the law. Is it possible, we can use xsd?

    in the left lower structure window, the tree you can import patterns.
    When completed the scheme will get an element import in your wsdl file, so no manual work not needed for that.

    After that you can simply use it to create variables based on it

  • How to use vGPU and vSGA both on the same host vSphere 6.0

    I tested vGPU on a host vSphere 6.0 to 6.1 of the Horizon, and I would now add a vSGA pool to this host. Only two physical GPU is used with the two vGPU vm that I turned on.

    My question is, what should I do to make this Host allow compatible vSGA VM turning on and share resources on the other two other GPU?  I put the office pool to use the 'Material' 3D rendering engine and added a VM pool.

    When I try to turn on the virtual machine, I get this error message in vSphere client Web:

    "GPU hardware is required but not available. The virtual machine will not start until the GPU resources are available or the virtual machine is configured to allow software rendering. »

    It's the output of command line gpuvm and nvidia-smi:

    gpuvm_nvidia-smi.png

    The host ESXi 6.0 has two cards of K2 of GRID for a total of 4 GPUS. Only two vGPU-enabled vm is turned on, it seems that I can use the other two GPU for vSGA VM, right?

    It is currently not possible since the Nvidia VIB:s vSGA and vGPU cannot be loaded at the same time.

    The driver will claim all compatible GPU:s (except those configured for passthrough, IE vDGA)

    An exception to this rule is if you have an AMD GPU for vSGA and a Nvidia GPU for vGPU.

    Can't comment on if, and when this will be resolved, perhaps krd can do.

    Linjo

  • AppleID hacked and changed all of the personal information

    Hello

    My husband hacked into China's apple ID and they have changed any personal information such as password, birth date, email address and security issues. When we called apple support, it could not help that we couldn't respond to security issues. How can they still expect us to respond to security issues, when these issues have been set by the person who hacked into. How to retrieve the apple ID, or can at least, we disable the apple id and recreate. Help, please.

    You have contacted the wrong line for Apple ID and security.

    If you have forgotten your security questions, you will need to make sure and contact Apple for resetting your security question! Here is the link where you can contact them to resolve the issue you are experiencing.

    https://support.Apple.com/en-us/HT204169

    OR if you are unable to call because you are not located in one of the countries mentioned in the link above, feel free to fill out and send it to them in this way, you are on the road to get reset your security questions

    Make sure you be patient! Here is the link below for the form.

    https://www.Apple.com/EMEA/support/iTunes/contact.html

    You can also try to visit this page to see how to reset your own security questions, but if this option is available for you, you will need to follow the links above.

    https://support.Apple.com/en-us/HT201485

  • How can I get my favorites appears on the personal bar? The bookmarks toolbar is just empty, even though it lists all my favorites below him when I open my favorites.

    I used the toolbar bookmarks for awhile. I was using Firefox last night, when I noticed it was empty. I went to view > toolbars > toolbar bookmarks and checked and unchecked it happens several times, but just what is a toolbar is empty. I also opened to the top of my favorites and all my favorites saved as Favorites bar are still there, and the links seem to work. I also stopped and restarted my computer, but the Favorites bar is always empty and I don't know what to do.

    Make sure you always have the "Bookmarks Toolbar items" on the personal bar

    • Make sure you have the 'personal bar' visible: "view > toolbars".
    • Check in "view > toolbars > customize" "Bookmarks Toolbar items" are on the personal bar
    • If the "Bookmarks Toolbar items" is not on the bookmarks toolbar, then get it back from the window Customize on the bookmarks toolbar
    • If you do not see the "Bookmarks Toolbar items" then click on the button "Restore Default Set"

    See also:

Maybe you are looking for

  • Often, I get a "Page not found" error when I click on the links.

    After the last update of Firefox, I have problems with the links in the emails or websites. When I click on them, often, I get a 404 error and webmasters often say they have tested the links and they work very well. I'm starting to think it's a brows

  • restrict the scaling axis in the xy graph

    Hi all After you apply due diligence in analyzing the context-sensitive help, labviewwiki and these fine forums, I couldn't find a hint on how to do this: I like tor would restrict the scale of only the value of a XY Chart axis. Or, to put it in othe

  • How to delete win xp pro update error 0x64C 'update server' to 'a sys normal updating?

    to change update "Server" to the normal system update

  • BlackBerry smartphone how to change Blackberry ID in my lamp?

    Hello I got a Blackberry bold 9790 and she is currently being fixed. Because of this, my friend lended his old Blackberry torch for me.  When I turned it on, it is connected as its Blackberry ID. How can I change my account? I've already placed my me

  • Aiuto

    Due giorni fa ho fatto UN Photoshop aggiornamento... Oggi ho access he computer e e sparito Photoshop... Ho tried reinstallarlo co un nuovo piano, my non riesco sommergibili con la... is qualcuno riesce ad avere oppure help a contact telephone email