国产激情自拍_国产9色视频_丁香花在线电影小说观看 _久久久久国产精品嫩草影院

首頁 > 編程 > VBScript > 正文

利用VBS腳本自動創建計算機帳戶的代碼

2020-07-26 12:05:21
字體:
來源:轉載
供稿:網友
mcse注:其實這是 按照ADSI(Active Directory Services Interface:活動目錄服務接口)寫的程序。如果你安裝了resource kit,這段代碼可以用netcom這條命令進行工作,下面是netcom的一個例子: 

  NETDOM /Domain:MYDOMAIN /user:adminuser /password:apassword MEMBER MYCOMPUTER /ADD 

復制代碼 代碼如下:

  ***********************

  '* Start Script

  '***********************

  Dim sComputerName, sUserOrGroup, sPath, computerContainer, rootDSE, lFlag

  Dim secDescriptor, dACL, ACE, oComputer, sPwd

  '

  '* Declare constants used in defining the default location for the

  '* machine account, flags to identify the object as a machine account,

  '* and security flags

  'Const UF_WORKSTATION_TRUST_ACCOUNT = &H1000

  Const UF_ACCOUNTDISABLE = &H2

  Const UF_PASSWD_NOTREQD = &H20

  Const ADS_GUID_COMPUTRS_CONTAINER = "aa312825768811d1aded00c04fd8d5cd"

  Const ADS_ACETYPE_ACCESS_ALLOWED = 0

  Const ADS_ACEFLAG_INHERIT_ACE = 2

  '

  '* Set the flags on this object to identify it as a machine account

  '* and determine the name. The name is used statically here, but may

  '* be determined by a command line parameter or by using an InputBox

  'lFlag = UF_WORKSTATION_TRUST_ACCOUNT Or UF_ACCOUNTDISABLE Or UF_PASSWD_NOTREQD

  sComputerName = "TestAccount"

  '

  '* Establish a path to the container in the Active Directory where

  '* the machine account will be created. In this example, this will

  '* automatically locate a domain controller for the domain, read the

  '* domain name, and bind to the default "Computers" container

  '*********************************************************************

  Set rootDSE = GetObject("LDAP://RootDSE")

  sPath = "LDAP://  Set computerContainer = GetObject(sPath)

  sPath = "LDAP://" & computerContainer.Get("distinguishedName")

  Set computerContainer = GetObject(sPath)

  ''* Here, the computer account is created. Certain attributes must

  '* have a value before calling .SetInfo to commit (write) the object

  '* to the Active Directory

  'Set oComputer = computerContainer.Create("computer", "CN=" & sComputerName)

  oComputer.Put "samAccountName", sComputerName + "$"

  oComputer.Put "userAccountControl", lFlag

  oComputer.SetInfo

  '

  '* Establish a default password for the machine account

  'sPwd = sComputerName & "$"

  sPwd = LCase(sPwd)

  oComputer.SetPassword sPwd

  ''* Specify which user or group may activate/join this computer to the

  '* domain. In this example, "MYDOMAIN" is the domain name and

  '* "JoeSmith" is the account being given the permission. Note that

  '* this is the downlevel naming convention used in this example.

  'sUserOrGroup = "MYDOMAIN/joesmith"

  ''* Bind to the Discretionary ACL on the newly created computer account

  '* and create an Access Control Entry (ACE) that gives the specified

  '* user or group full control on the machine account

  'Set secDescriptor = oComputer.Get("ntSecurityDescriptor")

  Set dACL = secDescriptor.DiscretionaryAcl

  Set ACE = CreateObject("AccessControlEntry")

  '

  '* An AccessMask of "-1" grants Full Control

  '

  ACE.AccessMask = -1

  ACE.AceType = ADS_ACETYPE_ACCESS_ALLOWED

  ACE.AceFlags = ADS_ACEFLAG_INHERIT_ACE

  ''* Grant this control to the user or group specified earlier.

  'ACE.Trustee = sUserOrGroup

  '

  '* Now, add this ACE to the DACL on the machine account

  'dACL.AddAce ACE

  secDescriptor.DiscretionaryAcl = dACL

  '

  '* Commit (write) the security changes to the machine account

  'oComputer.Put "ntSecurityDescriptor", Array(secDescriptor)

  oComputer.SetInfo

  ''* Once all parameters and permissions have been set, enable the

  '* account.

  '

  oComputer.AccountDisabled = False

  oComputer.SetInfo

  ''* Create an Access Control Entry (ACE) that gives the specified user

  '* or group full control on the machine account

  'wscript.echo "The command completed successfully."

  '*****************

  '* End Script


發表評論 共有條評論
用戶名: 密碼:
驗證碼: 匿名發表
国产激情自拍_国产9色视频_丁香花在线电影小说观看 _久久久久国产精品嫩草影院
国产xxx在线| 在线中文免费视频| 免费在线黄色网址| 精品国内一区二区三区免费视频| 国产激情在线视频| 精品无吗乱吗av国产爱色| 国产对白国语对白| av丝袜在线| 国产美女性感在线观看懂色av| 国产免费高清| 国产黄在线观看免费观看不卡| 国产精品伦一区二区三区级视频频 | 在线观看的av| 午夜亚洲成人| 国产裸舞福利在线视频合集| 激情亚洲综合网| 国产区卡一卡二卡三乱码免费| 国产福利av网站| v天堂福利视频在线观看| 黄色一级片视频| 国产性一级片| av资源网站在线观看| 欧美亚洲另类在线观看| 国产乱xxⅹxx国语对白| 国产9色视频| 最近中文字幕mv免费高清视频8| 国产黄色免费网站| 成年网在线观看免费观看网址| 国产精品18久久久久网站| www.xxx黄| 中文天堂av| 精品入口麻豆传煤| 国产无套粉嫩白浆在线2022年 | 国产精品久久久久白浆| 色悠久久久久综合网小说| 国产精品伦理一区二区三区 | 欧美午夜电影一区二区三区| 国产激情99| 国产精品自拍亚洲| 嫩草在线播放| www.99av| 狂野欧美性猛交xxxx乱大交| www操操操| 青青青青在线| 国产在线观看a视频| 美女免费视频黄| 青青草视频在线观看| 亚洲精品在线播放视频| 国产成+人+亚洲+欧美+综合| 五月天婷婷基地| 午夜av在线免费观看| 国产香蕉视频在线观看| 国产九色porn网址| 国产精品白浆流出视频| 国产精品欧美韩国日本久久| 国产日韩网站| 亚洲网站一区| 欧美日韩亚洲国内综合网| 女子免费在线观看视频www| av在线免费播放| 欧美性猛交xxxx免费看蜜桃| 操人视频91| 国产裸舞福利在线视频合集 | 免费在线看v| 久久久久久77777| 在线91av| av影视在线看| 国产自产视频| 中文字幕中文字幕在线中高清免费版| 国产性网软件大全| 亚洲永久免费网站| 天堂资源在线中文| 精品成人免费自拍视频| 久久99国产视频| 国产二级c片l毛片| 狠狠操狠狠色| 国产私拍精品| 免费男女羞羞的视频网站中文字幕| 激情六月丁香| gogogogo高清视频在线| 国产乱在线观看视频| 亚洲免费国产| 国产福利片在线| 尤物视频在线看| 亚洲www色| 国产黄色av免费看| 福利在线视频导航| av在线免费播放| 中文字幕2020第一页| 国产一二三视频| 日本福利在线| 国产精品第八页| 国产你懂的在线观看| 青青久在线视频免费观看| 国产91在线视频蝌蚪| 国产91大片| 久草在线视频网| 欧美日韩**字幕一区| 精品国产一区二区三区久久久狼牙| 国产卡1卡2卡三卡在线| 超碰国产在线| 九色成人在线| 丁香花高清在线观看完整版| 欧美xxxxx性| 免费观看一二区视频网站| 亚洲www色| 精品999视频| 在线视频1区2区| 在线视频观看亚洲| 在线看a视频| 欧美性猛交xxxx免费看久久| 日本免费黄色| 成人欧美日韩| 国产青草视频在线观看视频| 国产精品yjizz视频网一二区| 国产二区视频在线观看| 91极品在线| gogo在线高清视频| 国内外激情在线| 在线91av| 先锋av资源网| 青青免费在线视频| 中文字幕国产视频| 91激情在线| 国产在线观看a视频| 国产精品666| 男人天堂v视频| 国产一级大片| 亚洲sss视频| 中文字幕在线观看播放| 精品视频在线一区二区| 久热免费在线视频| 国产精品毛片一区二区三区四区 | 精品176二区| 免费看的毛片| 国产视频2区| 青草在线视频在线观看| 中文字幕网站视频在线| 亚洲国产成人综合| 五月亚洲综合| 成av人免费青青久| 2019天天操夜夜操| 国产精品一品| 国产在线视频福利| 亚洲精品视频区| 精品国产高清自在线一区二区三区 | 九九热视频免费在线观看| 国产大学生粉嫩无套流白浆| 免费观看久久久久| 四虎久久影院| av福利在线播放| 精品女厕厕露p撒尿| 中文字幕在线永久在线视频| 青草在线视频在线观看| 91三级在线| 国产成人精品自线拍| 国产污视频在线| 中文字幕在线免费| 亚色视频在线观看| 97福利电影| 国产成人精品实拍在线| 国产色在线播放| 五月伊人六月| 国产视频2区| 国产91久久久久| 在线免费观看污| av大片在线| av一级在线| av在线第一页| 久久久久国产精品嫩草影院| 九九热在线视频免费观看| 懂色av中文在线| 国产三级在线播放| 午夜国产在线| 在线中文字幕av| av网址在线看| 九九热在线观看| 国产精品一区二区三区视频网站| 国产免费黄色| 国产偷激情在线| 精品极品三级久久久久| 亚洲国产aⅴ精品| 成人欧美亚洲| 69国产精品视频| 久草亚洲一区| 国产盗摄一区二区| 青青青国产视频| 国产午夜电影| 国产精品伦一区二区三区级视频频 | 91xxx在线观看| 国产精品入口麻豆电影| 在线免费看黄| 不卡av免费观看| 国产精品二线| 精品欧美不卡一区二区在线观看| av手机免费在线观看| 福利资源在线久| 中文字幕av免费| 天堂在线视频| 色欧美在线观看|