需要有关将输出发送到db的WMI代码的帮助 [英] Need help with WMI code that will send output to db
问题描述
是WMI代码编写的新手,所以我需要一些帮助编写我们可以存储在我们服务器上的代码。我希望当用户登录到他们的计算机
并与我们的服务器通话时运行此代码。我还想要代码:
*检查用户计算机并查找所有已安装的补丁
*修补程序的安装日期
*用户计算机的序列号
*计算机名称,操作系统版本,上次启动时间和mac地址
然后将所有这些输出都输出到数据库文件。在命令提示符下我尝试过:
wmic qfe get description,hotfixid
这确实返回了我正在寻找的补丁信息,但是如何将这行代码与:
wmic os get version,csname,serialnumber,lastbootuptime
和
wmic nicconfig get macaddress
然后将所有这些输出到数据库文件?
'm new to WMI code writing, so I need some help with writing code that we can store on our server. I want this code to run when a user logs into their computer
and talks to our server. I also want the code to:
* check the users computer and find all installed patches
* the date the patches were installed
* the serial number of the users computer
* the computer name, os version, last boot up time, and mac address
and then have all this output to a database file. At the command prompt I've tried:
wmic qfe get description, hotfixid
This does return the patch information I'm looking for, but how do I combine that line of code with:
wmic os get version, csname, serialnumber, lastbootuptime
and
wmic nicconfig get macaddress
and then get all this to output to a database file?
推荐答案
在pre-vista机器上用户不能运行WMIC。
On pre-vista machines users cannot run WMIC.
您无需运行登录脚本来收集此信息。网络上全部都可以使用。
You do not need to run a login script to gather this information. It is all available on the network.
如果你运行了你想要的所有内容作为lgon脚本,他们不会做太多工作。
if you ran everything you wanted as a lgon script the uers would not get much work done.
首先阅读WMI的方式和内容以及它在网络中的使用方式。 Perhps hirung是一位顾问,帮助你解决这个问题,这是一个好主意。
Start by reading up on how and what WMI is and how it is used on a network. Perhps hirung a consultant to help you sort this out is it is really important would be a good idea.
您应该在Repositort / Gallert中查找可用于开始的脚本。
You should alos look in the Repositort/Gallert for scripts that you can use to get started.
这篇关于需要有关将输出发送到db的WMI代码的帮助的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!