Environment class
This class is referenced in scripts through the object “oEnvironment”.
For example you change the computer name to “Blah” using the following command:
            oEnvironment.Item("ComputerName") = “Blah”
Or if you needed to determine if this is an x86 or x64 then you could query the architecture using the following command:
            oEnvironment.Item("Architecture")
Environment类
这个通过对象"oEnvironment"使用
例如,你想把电脑名称改为"Blah",使用如下命令
           oEnvironment.Item("ComputerName") = “Blah”
或者假设你需要知道电脑的构架是x86或者x64
            oEnvironment.Item("Architecture")
 
Logging class
This class is referenced in scripts through the object “oLogging”.
When creating a informational log entry use the following command:
            oLogging.CreateEntry "Informational message", LogTypeInfo
When creating a error log entry use the following command:
            oLogging.CreateEntry "An error occured“,LogTypeError
Logging类
这个通过对象"oLogging"使用
创建一个通知log:
            oLogging.CreateEntry "Informational message", LogTypeInfo
创建一个错误log
            oLogging.CreateEntry "An error occured“,LogTypeError
 
Utility class
The class is referenced in scripts through the object “oUtility”.
To determine the name of the the current script, use the following command:
            oUtility.ScriptName
To find the location of a file and BDD use the following command will look in a number of locations for it.
            iRetVal = oUtility.FindFile("CustomSettings.ini", sIniFile)
Utility类
这个类通过对象"oUtility"
 
To determine the name of the the current script, use the following command:
  oUtility.ScriptName
 
寻找一个文件的位置
            iRetVal = oUtility.FindFile("CustomSettings.ini", sIniFile)
 
Database class
The class is referenced in scripts through the object “oDatabase”. There is generally no need to use the database class directly. Database lookups can be performed using rule processing. See my rule processing blog for more information.
这个类通过"oDatabase"调用。通常不需要直接使用database类。数据库通常通过使用参数查询。
This is a high level view of the tasks that ZTIUtility.vbs can perform. It is worthwhile taking a good look through the script yourself as there are many hidden gems.
通过 ZTIUtility.vbs可以实现更高级功能。

0

收藏

xmuxsp

207篇文章,86W+人气,2粉丝

Ctrl+Enter 发布

发布

取消

推荐专栏更多

5353379fc95da1d7d34fd243b9ace17f.jpg
全局视角看大型园区网

路由交换+安全+无线+优化+运维

共40章 | 51CTO夏杰
¥51.00 1682人订阅
45862f289339dc922ffda669fd74ad9b.jpg
网工2.0晋级攻略 ——零基础入门Python/Ansible

网络工程师2.0进阶指南

共30章 | 姜汁啤酒
¥51.00 1567人订阅
a940c66317ecbe58436a2ad3831c2d7d.png
基于Python的DevOps实战

自动化运维开发新概念

共20章 | 抚琴煮酒
¥51.00 430人订阅
629650e188ddde78b213e564c2e9ebff.jpg
负载均衡高手炼成记

高并发架构之路

共15章 | sery
¥51.00 507人订阅
dc6736c5fd50474b5df8b76b040e3d03.jpg
带你玩转高可用

前百度高级工程师的架构高可用实战

共15章 | 曹林华
¥51.00 462人订阅
f92360e227f9d91cdff7ea95120630ef.png
left-qr.jpg

扫一扫,领取大礼包

0

分享
qr-url?url=https%3A%2F%2Fblog.51cto.com%2Fxmuxsp%2F74506
xmuxsp
noavatar_middle.gif