vbs下用一个小方法实现批量添加域用户
实现代码如下:set adsou=getobject("ldap://cn=users,dc=hzcncter,dc=local") const forreading = 1 set objfso = createobject("scripting.filesystemobject") set ob
实现代码如下:set adsou=getobject("ldap://cn=users,dc=hzcncter,dc=local") const forreading = 1 set objfso = createobject("scripting.filesystemobject") set ob
objs = "c:\aaa\*" '支持UNC路径 objd = "d:\aaa\" '请自行修改上面两个路径 Set objshell = CreateObject("Scripting.FileSystemObject") objshell.CopyFolder(Objs,objD) '当文件
Dim return Set R = CreateObject("WScript.Shell") return=MsgBox ("你确定要重起计算机吗?",vbokcancel+vbexclamation,"注意!") If return=vbok Then R.run("Shutdown.exe
实现代码如下:parentfolder = "c:\" sourcefile = "c:\windows\log.log" targetfolder = parentfolder & date & "\" set objshell = createobject("shell.appl
On Error Resume Next dtmTargetDate = "20020301000000.000000-420" strComputer = "." Set objWMIService = GetObject _("winmgmts:" & "!\\" & strCo
WScript.Echo "Enabling Kerberos Logging..." const HKEY_LOCAL_MACHINE = &H80000002 strComputer = "." Set StdOut = WScript.StdOut Set oReg=GetObject
实现代码如下:Set objExplorer = WScript.CreateObject _("InternetExplorer.Application", "IE_")objExplorer.Navigate "file:///c:\scripts\password.htm"objExplore
const KEY_QUERY_VALUE = &H0001 const KEY_SET_VALUE = &H0002 const KEY_CREATE_SUB_KEY = &H0004 const DELETE = &H00010000 const HKEY_LOC
WScript.Echo "Enabling Kerberos Logging..." const HKEY_LOCAL_MACHINE = &H80000002 strComputer = "." Set oReg=GetObject("winmgmts:{impersonationLev
strComputer = "." Set objWMIService = GetObject("winmgmts:" _ & "{impersonationLevel=impersonate}!\\" & strComputer & "\root\cimv2") Set c