July 29, 2008
Well i made some changes to add this to RonsWebTools 3.21 .. Might be a better way to do it be here it goes. :)
-
Backup MachRest.asp
-
Copy ADAdminquery.vbs to $remote.
-
Edit MachRest.asp, near other button definitions (near the top) and add
<input style="WIDTH: 180px" type="button" value="AD Tools" name="Btnl730">
-
In Machrest.asp, near the bottom before </script> add
Sub Btnl730_OnClick
on error resume next
dim CompName,oWshShell
Set fso = createobject("scripting.filesystemobject")
CompName = trim(document.frmMain.txtValue.value)
Set WShell = CreateObject("WScript.Shell")
strTemp = wshell.ExpandEnvironmentStrings("%temp%")
fso.copyfile "
\\servername\remote$\ADAdminQuery.vbs",strTemp & "\"
ipath = strtemp & "\ADADminQuery.vbs "
if fso.fileExists(trim(ipath)) then
WShell.run ipath & compname,1,false
else
End if
End Sub
Download attachment at
http://myitforum.com/cs2/blogs/hcortez/archive/2008/07/25/ad-admin-query.aspx
Comments