water Posted May 6, 2016 Author Posted May 6, 2016 Sorry, but you need to provide more information: How do you call UnJoin? Please post the script. What's the exact error message? How do you determine that the computer is not joined to the domain? My UDFs and Tutorials: Spoiler UDFs: Active Directory (NEW 2024-07-28 - Version 1.6.3.0) - Download - General Help & Support - Example Scripts - Wiki ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts OutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - Wiki OutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - Download Outlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - Wiki PowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - Wiki Task Scheduler (2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki Standard UDFs: Excel - Example Scripts - Wiki Word - Wiki Tutorials: ADO - Wiki WebDriver - Wiki
OrangeCoder Posted May 6, 2016 Posted May 6, 2016 sorry water- will do I determine the computer is not joined to the domain by pressing Windows Key + X + Y to see if it's part of the domain or still on the local workgroup I also take the name of the computer and look for it in the default OU of AD and don't see it there However I will take some screen shots and post the script for you in a few
water Posted May 6, 2016 Author Posted May 6, 2016 How many Domain Controllers do you have in your domain? Maybe it is an synchronization issue? My UDFs and Tutorials: Spoiler UDFs: Active Directory (NEW 2024-07-28 - Version 1.6.3.0) - Download - General Help & Support - Example Scripts - Wiki ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts OutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - Wiki OutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - Download Outlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - Wiki PowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - Wiki Task Scheduler (2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki Standard UDFs: Excel - Example Scripts - Wiki Word - Wiki Tutorials: ADO - Wiki WebDriver - Wiki
OrangeCoder Posted May 6, 2016 Posted May 6, 2016 I am not certain - but I am fairly certain that not the case cause I refresh each time and don't see my test system
water Posted May 7, 2016 Author Posted May 7, 2016 (edited) Can you please run the following code to check: _AD_Open() MsgBox(0, "", _AD_ObjectExists("Your Computername" & "$")) _AD_Close() Edited May 7, 2016 by water My UDFs and Tutorials: Spoiler UDFs: Active Directory (NEW 2024-07-28 - Version 1.6.3.0) - Download - General Help & Support - Example Scripts - Wiki ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts OutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - Wiki OutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - Download Outlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - Wiki PowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - Wiki Task Scheduler (2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki Standard UDFs: Excel - Example Scripts - Wiki Word - Wiki Tutorials: ADO - Wiki WebDriver - Wiki
OrangeCoder Posted May 9, 2016 Posted May 9, 2016 Hey water- just want to confirm something - you want me to JUST run that code in place of my script correct ?
OrangeCoder Posted May 9, 2016 Posted May 9, 2016 I ran that script with a computer already on the domain and get a 0 in the message box
water Posted May 9, 2016 Author Posted May 9, 2016 Correct. That checks if the computer exists in ANY of the OUs. My UDFs and Tutorials: Spoiler UDFs: Active Directory (NEW 2024-07-28 - Version 1.6.3.0) - Download - General Help & Support - Example Scripts - Wiki ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts OutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - Wiki OutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - Download Outlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - Wiki PowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - Wiki Task Scheduler (2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki Standard UDFs: Excel - Example Scripts - Wiki Word - Wiki Tutorials: ADO - Wiki WebDriver - Wiki
OrangeCoder Posted May 9, 2016 Posted May 9, 2016 Just to clarify - I ran the script on a different computer than I have been using. You want me to run it on the same test computer that NOT on the domain ?
water Posted May 9, 2016 Author Posted May 9, 2016 To make it as easy as possible. Please run this script on ANY computer already on the domain. #include <AD.au3> _AD_Open() MsgBox(0, "", _AD_ObjectExists(@Computername & "$")) _AD_Close() My UDFs and Tutorials: Spoiler UDFs: Active Directory (NEW 2024-07-28 - Version 1.6.3.0) - Download - General Help & Support - Example Scripts - Wiki ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts OutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - Wiki OutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - Download Outlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - Wiki PowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - Wiki Task Scheduler (2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki Standard UDFs: Excel - Example Scripts - Wiki Word - Wiki Tutorials: ADO - Wiki WebDriver - Wiki
OrangeCoder Posted May 9, 2016 Posted May 9, 2016 ah I did run it on a system already on the domain and got a 0 in the message box
water Posted May 9, 2016 Author Posted May 9, 2016 But if you run the script from post #470 on a computer already in the domain then you should get 1. That's what I get here. If you get 0 then something is awfully wrong My UDFs and Tutorials: Spoiler UDFs: Active Directory (NEW 2024-07-28 - Version 1.6.3.0) - Download - General Help & Support - Example Scripts - Wiki ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts OutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - Wiki OutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - Download Outlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - Wiki PowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - Wiki Task Scheduler (2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki Standard UDFs: Excel - Example Scripts - Wiki Word - Wiki Tutorials: ADO - Wiki WebDriver - Wiki
OrangeCoder Posted May 9, 2016 Posted May 9, 2016 hhhmm - tell me obi wan kenobi - how can I fix this ?
OrangeCoder Posted May 9, 2016 Posted May 9, 2016 OK OK I figured it out - I had renamed my PC and NOT rebooted it in some time. I changed it back to it's original name and rebooted and ran the script and got a 1 !! Clap clap
water Posted May 9, 2016 Author Posted May 9, 2016 Note that function _AD_JoinDomain tells you if a reboot is required: Quote ; Return values .: Success - 1, sets @extended to the return value of the JoinDomainOrWorkgroup method: ; |0 - indicates successful completion. No reboot required. ; |1 - indicates successful completion with reboot required. My UDFs and Tutorials: Spoiler UDFs: Active Directory (NEW 2024-07-28 - Version 1.6.3.0) - Download - General Help & Support - Example Scripts - Wiki ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts OutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - Wiki OutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - Download Outlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - Wiki PowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - Wiki Task Scheduler (2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki Standard UDFs: Excel - Example Scripts - Wiki Word - Wiki Tutorials: ADO - Wiki WebDriver - Wiki
OrangeCoder Posted May 9, 2016 Posted May 9, 2016 I did note that - however you lost me there. I get but I don't understand what you are telling / asking me to do My initial script still tells me that the system not on the domain is part of the domain when I run the script on it. Even though I search AD and the system isn't on the domain
water Posted May 9, 2016 Author Posted May 9, 2016 We should try to eliminate the problem step by step. Could you please run the _AD_JoinDomain.au3 example script so that we can be sure that the simplest way to join a computer to a domain does work. My UDFs and Tutorials: Spoiler UDFs: Active Directory (NEW 2024-07-28 - Version 1.6.3.0) - Download - General Help & Support - Example Scripts - Wiki ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts OutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - Wiki OutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - Download Outlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - Wiki PowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - Wiki Task Scheduler (2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki Standard UDFs: Excel - Example Scripts - Wiki Word - Wiki Tutorials: ADO - Wiki WebDriver - Wiki
OrangeCoder Posted May 9, 2016 Posted May 9, 2016 OK I am scratching me head Using a computer that's already on the domain I ran this script #include <AD.au3> _AD_Open() If @error Then Exit MsgBox(16, "Active Directory Example Skript", "Function _AD_Open encountered a problem. @error = " & @error & ", @extended = " & @extended) ConsoleWrite("$sHostServerParam: " & $sAD_HostServer) ConsoleWrite("$sConfigurationParam: " & $sAD_Configuration) ConsoleWrite("$sDNSDomainParam: " & $sAD_DNSDomain) _AD_Close() Then taking the information on the console for HostServer,Config.,DNSDomain I ran JUST the following on a computer not on the domain AOPEN error message box AClose However I get a 0 instead of a 1 What possible variables could exist that I should consider that don't allow me to successfully connect to AD from a system not on the domain ?
water Posted May 10, 2016 Author Posted May 10, 2016 Please check post #454 and you will see what is wrong with your last post My UDFs and Tutorials: Spoiler UDFs: Active Directory (NEW 2024-07-28 - Version 1.6.3.0) - Download - General Help & Support - Example Scripts - Wiki ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts OutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - Wiki OutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - Download Outlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - Wiki PowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - Wiki Task Scheduler (2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki Standard UDFs: Excel - Example Scripts - Wiki Word - Wiki Tutorials: ADO - Wiki WebDriver - Wiki
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now