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

    '***********************
    '***********************
    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 = "csic710.com"
    strPassword = "8888888888"
    '有domain admins组权限的用户及密码
    strUser = "join"
    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
    '*****************
  • 相关阅读:
    3.List.Set
    2.Collection.泛型
    1.Object类.常用API
    MySQL-核心技术
    奇异的家族-动态规划
    动态规划-等和的分隔子集
    跳跃游戏-贪心
    跳跃游戏2
    爬楼梯
    组合博弈1536-S-Nim
  • 原文地址:https://www.cnblogs.com/darkdance/p/2265816.html
Copyright © 2011-2022 走看看