Jump to content

ILoveCoding

Members
  • Posts

    2
  • Joined

  • Last visited

About ILoveCoding

  • Birthday 08/01/1972

Profile Information

  • Location
    Cape Town South Africa
  • Interests
    Electronic Circuit Design, Programming, Arduino

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

ILoveCoding's Achievements

Seeker

Seeker (1/7)

0

Reputation

  1. Hi Water, Just some feedback. It was late last night and I was tired - so blame it on that - Anyway, ....... I tried to run the program I wrote to add some users to AD, directly on the Windows 2016 server when I received the error listed above ( return code -2147352567 ) Once I joined a PC to the domain, and ran the script from the PC - it worked 100% :-) Enjoy your leave and your UDF honestly rocks! Best thing ever!
  2. Guys - I have used the AD scrips often... and it works great! .. but I just tried it on a Windows 2016 Server and it fails with a simple Create User function? I get a failed message with return code -2147352567 Even the Example Script (Modified slightly below) fails. Global $sOU , $sUser _AD_Open() If @error Then Exit MsgBox(16, "Active Directory Example Skript", "Function _AD_Open encountered a problem. @error = " & @error & ", @extended = " & @extended) $sOU = "OU=Users,OU=CPT,OU=Locations,OU=AMSOLONE,DC=amsolone,DC=local" $sUser = "Test" Global $iValue = _AD_CreateUser($sOU, $sUser, "Test User") If $iValue = 1 Then MsgBox(64, "Active Directory Functions - Example 1", "User '" & $sUser & "' in OU '" & $sOU & "' successfully created") ElseIf @error = 1 Then MsgBox(64, "Active Directory Functions - Example 1", "User '" & $sUser & "' already exists") ElseIf @error = 2 Then MsgBox(64, "Active Directory Functions - Example 1", "OU '" & $sOU & "' does not exist") ElseIf @error = 3 Then MsgBox(64, "Active Directory Functions - Example 1", "Value for CN (e.g. Lastname Firstname) is missing") ElseIf @error = 4 Then MsgBox(64, "Active Directory Functions - Example 1", "Value for $sAD_User is missing") Else MsgBox(64, "Active Directory Functions - Example 1", "Return code '" & @error & "' from Active Directory") EndIf _AD_Close()
×
×
  • Create New...