Domain-Join schlägt fehl - Windows 10

MG-Mann
Beiträge: 21
Registriert: 07 Mär 2019, 08:19

Domain-Join schlägt fehl - Windows 10

Beitragvon MG-Mann » 09 Aug 2019, 11:49

Hallo Zusammen,

ich versuche mein Windows 10 in die Domäne aufzunehmen und habe mich dem Packet windomain_1.0-8.opsi bedient.
Ich habe die Werte für die Domäne entsprechend angepasst.


Das log sieht wie folgt aus:
[6] [Aug 09 10:56:36:166] ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
[6] [Aug 09 10:56:36:166] Resolved sequence of products (09.08.2019 10:56:36):
[6] [Aug 09 10:56:36:166] Product 1 firma_domain_join : once
[6] [Aug 09 10:56:36:166] ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
[6] [Aug 09 10:56:36:864] Actionrequest for product: firma_domain_join is (original/actual): (once / once)
[6] [Aug 09 10:56:36:907] [firma_domain_join] Actionrequest for Product: firma_domain_join is: once
[6] [Aug 09 10:56:38:001] [firma_domain_join] scriptname: "setup.ins", special path: "p:\firma_domain_join\"
[1] [Aug 09 10:56:38:001] [firma_domain_join] Prog: force_min_loglevel: 0
[1] [Aug 09 10:56:38:002] [firma_domain_join] Prog: default_loglevel: 6
[1] [Aug 09 10:56:38:002] [firma_domain_join] Prog: debug_prog: False
[1] [Aug 09 10:56:38:002] [firma_domain_join] Prog: debug_lib: False
[1] [Aug 09 10:56:38:002] [firma_domain_join] Prog: ScriptErrorMessages: False
[1] [Aug 09 10:56:38:002] [firma_domain_join] Prog: AutoActivityDisplay: True
[6] [Aug 09 10:56:38:002] [firma_domain_join] Using new Depot path: p:\
[1] [Aug 09 10:56:38:075] [firma_domain_join]
[1] [Aug 09 10:56:38:075] [firma_domain_join] ============ Version 4.12.0.35 script "p:\firma_domain_join\setup.ins"
[1] [Aug 09 10:56:38:075] [firma_domain_join] used script encoding: cp1252
[1] [Aug 09 10:56:38:075] [firma_domain_join] used system encoding: cp1252
[1] [Aug 09 10:56:38:075] [firma_domain_join] start: 2019-08-09 10:56:38
[1] [Aug 09 10:56:38:076] [firma_domain_join] installing product: firma_domain_join_1.0-6
[1] [Aug 09 10:56:38:076] [firma_domain_join] on client named "1775-nb.firma.loc"
[1] [Aug 09 10:56:38:077] [firma_domain_join] loggedin user "Administrator"
[1] [Aug 09 10:56:38:077] [firma_domain_join] opsi-script running as "SYSTEM"
[1] [Aug 09 10:56:38:078] [firma_domain_join] opsi-script running with admin privileges
[1] [Aug 09 10:56:38:078] [firma_domain_join] opsi-script running in standard script mode
[1] [Aug 09 10:56:38:078] [firma_domain_join] executing: "C:\Program Files (x86)\opsi.org\opsi-client-agent\opsi-winst\winst32.exe"
[1] [Aug 09 10:56:38:078] [firma_domain_join] system infos:
[1] [Aug 09 10:56:38:093] [firma_domain_join] 00-07-07-07-09-BF - PC hardware address
[1] [Aug 09 10:56:38:093] [firma_domain_join] 1775-NB - IP name
[1] [Aug 09 10:56:38:093] [firma_domain_join] 192.168.10.151 - IP address
[1] [Aug 09 10:56:38:093] [firma_domain_join] DEU - System default locale
[6] [Aug 09 10:56:38:094] [firma_domain_join] Registry key [HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion] opened
[6] [Aug 09 10:56:38:094] [firma_domain_join] Key closed
[1] [Aug 09 10:56:38:094] [firma_domain_join] MS Windows 10.0 64 Bit, Release: 1903, Edition: PRODUCT_PROFESSIONAL
[1] [Aug 09 10:56:38:094] [firma_domain_join] opsi service version : 4
[1] [Aug 09 10:56:38:094] [firma_domain_join]
[6] [Aug 09 10:56:38:097] [firma_domain_join] Registry key [HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion] opened
[6] [Aug 09 10:56:38:097] [firma_domain_join] Key closed
[6] [Aug 09 10:56:38:261] [firma_domain_join] opsi-script has version 4.12.0.35, required is : >= 4.11.4.6
[6] [Aug 09 10:56:38:261] [firma_domain_join] ScriptErrorMessages was False is set to false
[6] [Aug 09 10:56:38:264] [firma_domain_join] Set $MsVersion$ = GetMsVersionInfo
[6] [Aug 09 10:56:38:269] [firma_domain_join] The value of the variable "$MsVersion$" is now: "10.0"
[6] [Aug 09 10:56:38:270] [firma_domain_join] Set $OSArch$ = GetSystemType
[6] [Aug 09 10:56:38:270] [firma_domain_join] The value of the variable "$OSArch$" is now: "64 Bit System"
[6] [Aug 09 10:56:38:270] [firma_domain_join] Set $Domain$ = GetProductProperty("domain","firma.loc")
[6] [Aug 09 10:56:38:270] [firma_domain_join] The value of the variable "$Domain$" is now: ""
[6] [Aug 09 10:56:38:271] [firma_domain_join] Set $Username$ = GetProductProperty("username","sa-opsi")
[6] [Aug 09 10:56:38:271] [firma_domain_join] The value of the variable "$Username$" is now: ""
[6] [Aug 09 10:56:38:271] [firma_domain_join] Set $Password$ = GetProductProperty("password","123456")
[6] [Aug 09 10:56:38:271] [firma_domain_join] The value of the variable "$Password$" is now: ""
[6] [Aug 09 10:56:38:272] [firma_domain_join] Set $AccountOU$ = GetProductProperty("account_ou","unknown")
[6] [Aug 09 10:56:38:272] [firma_domain_join] The value of the variable "$AccountOU$" is now: ""
[6] [Aug 09 10:56:38:272] [firma_domain_join] Set $AccountOU$ = ComposeString(SplitString($AccountOU$, ','), ';')
[6] [Aug 09 10:56:38:273] [firma_domain_join] The value of the variable "$AccountOU$" is now: ""
[6] [Aug 09 10:56:38:273] [firma_domain_join] Set $method$ = GetProductProperty("method","unknown")
[6] [Aug 09 10:56:38:273] [firma_domain_join] The value of the variable "$method$" is now: "auto"
[6] [Aug 09 10:56:38:273] [firma_domain_join] Set $primarywinsserver$ = GetProductProperty("primarywinsserver","192.168.10.100")
[6] [Aug 09 10:56:38:274] [firma_domain_join] The value of the variable "$primarywinsserver$" is now: ""
[6] [Aug 09 10:56:38:274] [firma_domain_join] Set $secondarywinsserver$ = GetProductProperty("secondarywinsserver","192.168.11.100")
[6] [Aug 09 10:56:38:274] [firma_domain_join] The value of the variable "$secondarywinsserver$" is now: ""
[5] [Aug 09 10:56:38:548] [firma_domain_join] message Perparing to join
[6] [Aug 09 10:56:38:552] [firma_domain_join] If
[6] [Aug 09 10:56:38:556] [firma_domain_join] $method$ = "auto" <<< result true
[6] [Aug 09 10:56:38:556] [firma_domain_join] Then
[5] [Aug 09 10:56:38:556] [firma_domain_join] comment: we are in auto mode - let us decide which method to use
[6] [Aug 09 10:56:38:557] [firma_domain_join] If
[6] [Aug 09 10:56:38:557] [firma_domain_join] CompareDotSeparatedNumbers($MsVersion$,"6.0") < "0" <<< result false
[6] [Aug 09 10:56:38:557] [firma_domain_join] Then
[6] [Aug 09 10:56:38:558] [firma_domain_join] Else
[5] [Aug 09 10:56:38:558] [firma_domain_join] comment: on NT6 we start with powershell and if this fails we use wmic
[6] [Aug 09 10:56:38:558] [firma_domain_join] Set $method$ = "powershell"
[6] [Aug 09 10:56:38:558] [firma_domain_join] The value of the variable "$method$" is now: "powershell"
[6] [Aug 09 10:56:38:558] [firma_domain_join] EndIf
[6] [Aug 09 10:56:38:559] [firma_domain_join] EndIf
[6] [Aug 09 10:56:38:559] [firma_domain_join] If
[6] [Aug 09 10:56:38:559] [firma_domain_join] $method$ = "netdom.exe" <<< result false
[6] [Aug 09 10:56:38:559] [firma_domain_join] Then
[6] [Aug 09 10:56:38:559] [firma_domain_join] If
[6] [Aug 09 10:56:38:560] [firma_domain_join] Then
[6] [Aug 09 10:56:38:560] [firma_domain_join] If
[6] [Aug 09 10:56:38:560] [firma_domain_join] Then
[6] [Aug 09 10:56:38:560] [firma_domain_join] Else
[6] [Aug 09 10:56:38:560] [firma_domain_join] EndIf
[6] [Aug 09 10:56:38:561] [firma_domain_join] Else
[6] [Aug 09 10:56:38:561] [firma_domain_join] EndIf
[6] [Aug 09 10:56:38:561] [firma_domain_join] EndIf
[6] [Aug 09 10:56:38:561] [firma_domain_join] If
[6] [Aug 09 10:56:39:362] [firma_domain_join] ExitCode 0
[6] [Aug 09 10:56:39:370] [firma_domain_join] Search "c:\opsi.org\tmp\"
[6] [Aug 09 10:56:39:370] [firma_domain_join] Search "c:\opsi.org\tmp\_opsiscript_*"
[6] [Aug 09 10:56:39:371] [firma_domain_join] ( lower(trim(takeString(2, getOutStreamFromSection('DosInAnIcon_get_partofdomain')))) = "true" ) <<< result false
[6] [Aug 09 10:56:39:371] [firma_domain_join] Then
[6] [Aug 09 10:56:39:375] [firma_domain_join] If
[6] [Aug 09 10:56:39:375] [firma_domain_join] Then
[6] [Aug 09 10:56:39:375] [firma_domain_join] EndIf
[6] [Aug 09 10:56:39:376] [firma_domain_join] If
[6] [Aug 09 10:56:39:376] [firma_domain_join] Then
[6] [Aug 09 10:56:39:376] [firma_domain_join] EndIf
[6] [Aug 09 10:56:39:376] [firma_domain_join] EndIf
[5] [Aug 09 10:56:39:377] [firma_domain_join] message Joining domain
[5] [Aug 09 10:56:39:381] [firma_domain_join] comment: Disconnecting shares to avoid multiple connections to the same server with different usernames
[5] [Aug 09 10:56:39:383] [firma_domain_join] Execution of: DosInAnIcon_disconnect winst /sysnative
[6] [Aug 09 10:56:39:856] [firma_domain_join] ExitCode 0
[6] [Aug 09 10:56:39:857] [firma_domain_join] Search "c:\opsi.org\tmp\"
[6] [Aug 09 10:56:39:857] [firma_domain_join] Search "c:\opsi.org\tmp\_opsiscript_*"
[6] [Aug 09 10:56:39:861] [firma_domain_join]
[6] [Aug 09 10:56:39:861] [firma_domain_join] ExitWindows set to Reboot
[6] [Aug 09 10:56:39:862] [firma_domain_join] If
[6] [Aug 09 10:56:39:862] [firma_domain_join] CompareDotSeparatedNumbers($MsVersion$,"6.0") >= "0" <<< result true
[6] [Aug 09 10:56:39:862] [firma_domain_join] Then
[6] [Aug 09 10:56:39:862] [firma_domain_join] If
[6] [Aug 09 10:56:39:863] [firma_domain_join] GetProductProperty("samba_domain","true") = "true" <<< result false
[6] [Aug 09 10:56:39:863] [firma_domain_join] Then
[6] [Aug 09 10:56:39:864] [firma_domain_join] EndIf
[6] [Aug 09 10:56:39:864] [firma_domain_join] EndIf
[6] [Aug 09 10:56:39:864] [firma_domain_join] If
[6] [Aug 09 10:56:39:864] [firma_domain_join] $method$ = "netdom.exe" <<< result false
[6] [Aug 09 10:56:39:864] [firma_domain_join] Then
[6] [Aug 09 10:56:39:864] [firma_domain_join] If
[6] [Aug 09 10:56:39:865] [firma_domain_join] Then
[6] [Aug 09 10:56:39:865] [firma_domain_join] Else
[6] [Aug 09 10:56:39:865] [firma_domain_join] EndIf
[6] [Aug 09 10:56:39:866] [firma_domain_join] EndIf
[6] [Aug 09 10:56:39:866] [firma_domain_join] If
[6] [Aug 09 10:56:39:866] [firma_domain_join] $method$ = "powershell" <<< result true
[6] [Aug 09 10:56:39:866] [firma_domain_join] Then
[6] [Aug 09 10:56:39:867] [firma_domain_join] Set $exitcode$ = "0"
[6] [Aug 09 10:56:39:867] [firma_domain_join] The value of the variable "$exitcode$" is now: "0"
[5] [Aug 09 10:56:39:868] [firma_domain_join] Execution of: DosInAnIcon_setpolicy
[6] [Aug 09 10:56:48:104] [firma_domain_join] ExitCode 0
[6] [Aug 09 10:56:48:105] [firma_domain_join] Search "c:\opsi.org\tmp\"
[6] [Aug 09 10:56:48:105] [firma_domain_join] Search "c:\opsi.org\tmp\_opsiscript_*"
[6] [Aug 09 10:56:48:110] [firma_domain_join] Set $exitcode$ = getLastExitcode
[6] [Aug 09 10:56:48:111] [firma_domain_join] The value of the variable "$exitcode$" is now: "0"
[6] [Aug 09 10:56:48:111] [firma_domain_join] Set $exitcode$ = "0"
[6] [Aug 09 10:56:48:111] [firma_domain_join] The value of the variable "$exitcode$" is now: "0"
[6] [Aug 09 10:56:48:112] [firma_domain_join] If
[6] [Aug 09 10:56:48:112] [firma_domain_join] ($AccountOU$ = "") <<< result true
[6] [Aug 09 10:56:48:112] [firma_domain_join] Then
[6] [Aug 09 10:56:48:113] [firma_domain_join] Set $list$ = getOutStreamFromSection ('ExecWith_powershell powershell.exe')
[6] [Aug 09 10:56:48:115] [firma_domain_join]
[6] [Aug 09 10:56:48:115] [firma_domain_join] Execution of ExecWith_powershell powershell.exe
[6] [Aug 09 10:56:57:663] [firma_domain_join] ExitCode 1
[6] [Aug 09 10:56:57:668] [firma_domain_join] Search "c:\opsi.org\tmp\"
[6] [Aug 09 10:56:57:668] [firma_domain_join] Search "c:\opsi.org\tmp\_opsiscript_*"
[6] [Aug 09 10:56:57:676] [firma_domain_join] Else
[6] [Aug 09 10:56:57:676] [firma_domain_join] If
[6] [Aug 09 10:56:57:676] [firma_domain_join] Then
[6] [Aug 09 10:56:57:677] [firma_domain_join] EndIf
[6] [Aug 09 10:56:57:677] [firma_domain_join] EndIf
[6] [Aug 09 10:56:57:677] [firma_domain_join] Set $exitcode$ = getLastExitcode
[6] [Aug 09 10:56:57:678] [firma_domain_join] The value of the variable "$exitcode$" is now: "1"
[6] [Aug 09 10:56:57:678] [firma_domain_join] If
[6] [Aug 09 10:56:57:678] [firma_domain_join] not ($exitcode$ = "0") <<< result true
[6] [Aug 09 10:56:57:678] [firma_domain_join] Then
[5] [Aug 09 10:56:57:679] [firma_domain_join] comment: join via powershell failed - retry with wmic
[6] [Aug 09 10:56:57:679] [firma_domain_join] Set $method$ = "wmic"
[6] [Aug 09 10:56:57:680] [firma_domain_join] The value of the variable "$method$" is now: "wmic"
[6] [Aug 09 10:56:57:680] [firma_domain_join] EndIf
[6] [Aug 09 10:56:57:680] [firma_domain_join] EndIf
[6] [Aug 09 10:56:57:680] [firma_domain_join] If
[6] [Aug 09 10:56:57:680] [firma_domain_join] $method$ = "wmic" <<< result true
[6] [Aug 09 10:56:57:680] [firma_domain_join] Then
[6] [Aug 09 10:56:57:680] [firma_domain_join] If
[6] [Aug 09 10:56:57:681] [firma_domain_join] ($AccountOU$ = "") <<< result true
[6] [Aug 09 10:56:57:681] [firma_domain_join] Then
[5] [Aug 09 10:56:57:681] [firma_domain_join] comment: Using wmi to join domain
[5] [Aug 09 10:56:57:683] [firma_domain_join] Execution of: DosInAnIcon_join_domain_wmic winst /sysnative
[6] [Aug 09 10:56:58:215] [firma_domain_join] ExitCode -2147217361
[6] [Aug 09 10:56:58:216] [firma_domain_join] Search "c:\opsi.org\tmp\"
[6] [Aug 09 10:56:58:216] [firma_domain_join] Search "c:\opsi.org\tmp\_opsiscript_*"
[6] [Aug 09 10:56:58:221] [firma_domain_join] Else
[6] [Aug 09 10:56:58:222] [firma_domain_join] EndIf
[6] [Aug 09 10:56:58:222] [firma_domain_join] EndIf
[6] [Aug 09 10:56:58:222] [firma_domain_join] If
[6] [Aug 09 10:56:58:785] [firma_domain_join] ExitCode 0
[6] [Aug 09 10:56:58:786] [firma_domain_join] Search "c:\opsi.org\tmp\"
[6] [Aug 09 10:56:58:787] [firma_domain_join] Search "c:\opsi.org\tmp\_opsiscript_*"
[6] [Aug 09 10:56:58:788] [firma_domain_join] ( lower(trim(takeString(2, getOutStreamFromSection('DosInAnIcon_get_partofdomain')))) = "false" ) <<< result true
[6] [Aug 09 10:56:58:788] [firma_domain_join] Then
[3] [Aug 09 10:56:58:792] [firma_domain_join] Error: Failed to join domain
[2] [Aug 09 10:56:58:792] [firma_domain_join] Error level set to fatal
[6] [Aug 09 10:56:58:792] [firma_domain_join] Process aborted
[1] [Aug 09 10:56:58:793] [firma_domain_join] ___________________
[1] [Aug 09 10:56:58:793] [firma_domain_join] script finished: failed
[1] [Aug 09 10:56:58:793] [firma_domain_join] 1 error

Leider finde ich keine weiteren Informationen, warum der Join nicht funktioniert.
Hat jemand eine Idee?

Benutzeravatar
SisterOfMercy
Beiträge: 1016
Registriert: 22 Jun 2012, 19:18

Re: Domain-Join schlägt fehl - Windows 10

Beitragvon SisterOfMercy » 09 Aug 2019, 15:24

You have exitcode -2147217361. Convert this to hex, and you get this code: FFFFFFFF8004102F
0x8004102F is thus the error code that works better on a search machine:

WBEM_E_INVALID_METHOD_PARAMETERS
2147749935 (0x8004102F)
Parameters provided for the method are not valid.
Bitte schreiben Sie Deutsch, when I'm responding in the German-speaking part of the forum!

Benutzeravatar
SisterOfMercy
Beiträge: 1016
Registriert: 22 Jun 2012, 19:18

Re: Domain-Join schlägt fehl - Windows 10

Beitragvon SisterOfMercy » 09 Aug 2019, 15:26

Code: Alles auswählen

      if (CompareDotSeparatedNumbers($INST_MsVersion$, "=", "10.0"))
         DosInAnIcon_join_domain_win10_wmic WINST /SysNative
      else
         DosInAnIcon_join_domain_wmic WINST /SysNative
      endif


[DosInAnIcon_join_domain_wmic]
; Join domain
"%SystemRoot%\system32\wbem\wmic.exe" /interactive:off computersystem where name!=null call JoinDomainOrWorkgroup "",3,"domainname","adminpass","domainname\Administrator"
exit %ERRORLEVEL%

[DosInAnIcon_join_domain_win10_wmic]
; Join domain
"%SystemRoot%\system32\wbem\wmic.exe" /interactive:off computersystem where name!=null call JoinDomainOrWorkgroup "",3,"domainname.local","adminpass","domainname\Administrator"
exit %ERRORLEVEL%


This works for me. It seems the domainname for w10 must be a fqdn?
Bitte schreiben Sie Deutsch, when I'm responding in the German-speaking part of the forum!