zl程序教程

您现在的位置是:首页 >  其他

当前栏目

一段利用WSH获取登录时间的jscript代码

代码 利用 获取 时间 登录 一段 jscript WSH
2023-06-13 09:14:00 时间
复制代码代码如下:

var enmProfile = new Enumerator(GetObject("winmgmts:").InstancesOf("Win32_NetworkLoginProfile")); 
var arr = new Array("用户名\t最后登录时间"); 
while(!enmProfile.atEnd()) 

        arr.push(enmProfile.item().Name + "\t" + enmProfile.item().LastLogon); 
        enmProfile.moveNext(); 

WSH.Echo(arr.join("\r\n"));