Forum |  HardWare.fr | News | Articles | PC | S'identifier | S'inscrire | Shop Recherche
3388 connectés 

 


Dernière réponse
Sujet : AD - Script ou ligne de commande pour inscrire machine dans le domaine
bigstyle +1 pour netdom aussi

Votre réponse
Nom d'utilisateur    Pour poster, vous devez être inscrit sur ce forum .... si ce n'est pas le cas, cliquez ici !
Le ton de votre message                        
                       
Votre réponse


[b][i][u][strike][spoiler][fixed][cpp][url][email][img][*]   
 
   [quote]
 

Options

 
Vous avez perdu votre mot de passe ?


Vue Rapide de la discussion
bigstyle +1 pour netdom aussi
dahlo

Citation :

You want to know whether the script will run on Windows 2000-based computers. As it turns out, it does not, because the Win32_ComputerSystem class does not support the JoinDomainOrWorkGroup method on Windows 2000. The JoinDomainOrWorkGroup method was added to the Win32_ComputerSystem class in the version of WMI included with Windows XP. Source:http://www.microsoft.com/technet/s [...] _osjn.mspx


voir: http://msdn.microsoft.com/library/ [...] system.asp -> Requirements (Client)
       http://support.microsoft.com/kb/q222525/

brainbugs +1 netdom c'est plus sur.
boisorbe quel type de machine tu integres (XP ou 2000)?
il me semblait qu'il ne fonctionnait pas pour des 2000 ce script ou alors j'avais mal teste...
 
j'utilise netdom lancer par un script :D
ca pourrait m'alleger ca.
Le Veilleur :jap:
symantec Merci Messieurs (enfin je crois)
 
Le VBS est niquel chrome !
Le Veilleur

symantec a écrit :

Ca existe une ligne de commande ou un script pour enregistrer une machine dans un domaine AD ?
 
J'ai cherché sur Google mais y m'a rien trouvé !
 
Merci


Code :
  1. Const JOIN_DOMAIN = 1
  2. Const ACCT_CREATE = 2
  3. Const ACCT_DELETE = 4
  4. Const WIN9X_UPGRADE = 16
  5. Const DOMAIN_JOIN_IF_JOINED = 32
  6. Const JOIN_UNSECURE = 64
  7. Const MACHINE_PASSWORD_PASSED = 128
  8. Const DEFERRED_SPN_SET = 256
  9. Const INSTALL_INVOCATION = 262144
  10. strDomain = "FABRIKAM"
  11. strPassword = "ls4k5ywA"
  12. strUser = "shenalan"
  13. Set objNetwork = CreateObject("WScript.Network" )
  14. strComputer = objNetwork.ComputerName
  15. Set objComputer = GetObject("winmgmts:{impersonationLevel=Impersonate}!\\" & _
  16.     strComputer & "\root\cimv2:Win32_ComputerSystem.Name='" & _
  17.         strComputer & "'" )
  18. ReturnValue = objComputer.JoinDomainOrWorkGroup(strDomain, _
  19.     strPassword, strDomain & "\" & strUser, NULL, _
  20.         JOIN_DOMAIN + ACCT_CREATE)

shuai netdom...
symantec Ca existe une ligne de commande ou un script pour enregistrer une machine dans un domaine AD ?
 
J'ai cherché sur Google mais y m'a rien trouvé !
 
Merci

Copyright © 1997-2025 Groupe LDLC (Signaler un contenu illicite / Données personnelles)