C
chris.harrod
I have a simple VBS to return some unless data (as a test) and it
works correctly.
However, when I turn it into an ASP I get no results. Can someone
tell me what I'm doing wrong?
works correctly.
Code:
Set objSWbemLocator = CreateObject("WbemScripting.SWbemLocator")
Set objSWbemServices = GetObject("winmgmts:
{impersonationLevel=impersonate}!\\" & "computername" & "\root\SMS
\site_PRI")
SetColmachines = objSWbemServices.ExecQuery("select ResourceID FROM
SMS_R_System")
For Each objMachine In ColMachines
ResourceID = objMachine.ResourceID
wscript.echo ResourceID
Next
However, when I turn it into an ASP I get no results. Can someone
tell me what I'm doing wrong?
Code:
<%@ LANGUAGE=VBSCRIPT %>
<html>
<%
Set objSWbemLocator = CreateObject("WbemScripting.SWbemLocator")
Set objSWbemServices = GetObject("winmgmts:
{impersonationLevel=impersonate}!\\" & "computername" & "\root\SMS
\site_PRI")
SetColmachines = objSWbemServices.ExecQuery("select ResourceID FROM
SMS_R_System")
For Each objMachine In ColMachines
%> test <%
Next
%>
</html>