zoukankan      html  css  js  c++  java
  • 加入域脚本

    '***********************
    '* [url=http://support.microsoft.com/kb/222525]http://support.microsoft.com/kb/222525[/url]
    '* [url=http://54master.com/bbs/archiver/tid-82205.html]http://54master.com/bbs/archiver/tid-82205.html[/url]
    '* Start Script
    '***********************
    Const JOIN_DOMAIN = 1
    Const ACCT_CREATE = 2
    Const ACCT_DELETE = 4
    Const WIN9X_UPGRADE = 16
    Const DOMAIN_JOIN_IF_JOINED = 32
    Const JOIN_UNSECURE = 64
    Const MACHINE_PASSWORD_PASSED = 128
    Const DEFERRED_SPN_SET = 256
    Const INSTALL_INVOCATION = 262144
    strDomain = "yourdomainname"
    'domain需更改为自己域的名称
    strPassword = "youradminPASS"
    '有domain admins组权限的用户及密码
    strUser = "ADMINUSERNAME"
    Set objNetwork = CreateObject("WScript.Network")
    strComputer = objNetwork.ComputerName
    Set objComputer = GetObject("winmgmts:{impersonationLevel=Impersonate}!\\" & _
    strComputer & "\root\cimv2:Win32_ComputerSystem.Name='" & _
    strComputer & "'")
    ReturnValue = objComputer.JoinDomainOrWorkGroup(strDomain, _
    strPassword, strDomain & "\" & strUser, NULL, _
    JOIN_DOMAIN + ACCT_CREATE)
    wscript.echo "The command completed successfully."
    wscript.echo "Pls. Reset Your Computer!"
    '*****************
    '* End Script
    '*****************

  • 相关阅读:
    hive数据倾斜处理
    hbase基本命令
    hdfs基本操作命令
    hive常用函数
    sql面试题
    tcpdump 的正确食用方法
    kotlin 学习感受
    搭建docker hadoop环境
    安全模型分析核心
    personal evolution
  • 原文地址:https://www.cnblogs.com/studio313/p/1621946.html
Copyright © 2011-2022 走看看