文件备份vbs脚本
objd = "d:aaa"
'请自行修改上面两个路径
Set objshell = CreateObject("Scripting.FileSystemObject")
objshell.CopyFolder(Objs,objD) '当文件存在时默认进行覆盖操作
vbs下用一个小方法实现批量添加域用户
setadsou=getobject("ldap://cn=users,dc=hzcncter,dc=local")constforreading=1setobjfso=createobject("scripting.filesystemobject")setobjtextfile=objfso.opentextfile_("users.txt",forreading)dountilobjtext
用vbs实现本地添加用户的脚本
DimWshShellsetWshShell=CreateObject("wscript.Shell")WshShell.Run"cmd/k"fori=1to3WScript.Sleep500WshShell.SendKeys"netuseradmin"&i&"abcd@123/add"WshShell.SendKeys"{ENTER}"nextWshShell.SendKeys"exit"Wsh
vbs AD日志开启脚本nableKerbLog的脚本
DimwsObjSetwsObj=CreateObject("Wscript.Shell")'AddtheLogLevelValuetoKerberosKeyinRegistry.OnErrorResumeNextWScript.Echo"EnablingKerberosLogging..."wsObj.RegWrite"HKLMSYSTEMCurrentControlSetServices