This is a multi-part message in MIME format.
------=_NextPart_000_01FA_01C5CB4A.58582FC0
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
Hi all,
I want to check WMI Connection to all PCs in my domain. Script code is =
as following:
For Each strComputer in arrComputers
Set objWMIService =3D GetObject("winmgmts:\\" & strComputer =
&"\root\cimv2") '(*)
If Err.Number > 0 Then
WScript.Echo strComputer & " - Unable to connect to WMI. Error " =
& Err.Number & "-" & Err.Description
Err.Clear
Else
WScript.Echo strComputer & "Connect to WMI: OK!"
End If
Next
WMI, DCOM, COM+ services are running well in all PCs. Domain Group =
Policy forces Windows Firewall in all PCs to open port 135 & 445.
There're times that WMI Connection to some PCs cannot be successful =
because Domain Group Policy are not applied at the PCs. So when the =
script runs, it stops at line (*) about 1 hour (If you choose Properties =
at WMI Control in Computer Management, you will have to wait a long =
time).
This issue occurs in all Wins XP SP2 & Wins 2K SP4.
This issue can be solved by running command "gpupdate /force" OR =
"secedit /refreshpolicy ..."
I want to decrease time to wait PCs' WMI unconnectable. I want to know =
whether a PC is connectable or not immediately. There is any way?
Thanks
------=_NextPart_000_01FA_01C5CB4A.58582FC0
Content-Type: text/html;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=3DContent-Type content=3D"text/html; =
charset=3Diso-8859-1">
<META content=3D"MSHTML 6.00.2900.2722" name=3DGENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY>
<DIV><FONT face=3DArial size=3D2>Hi all,</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>I want to check WMI Connection to all =
PCs in my=20
domain. Script code is as following:</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial color=3D#ff0000 size=3D2>For Each strComputer in =
arrComputers</FONT></DIV>
<DIV><FONT face=3DArial color=3D#ff0000 size=3D2> Set =
objWMIService=20
=3D GetObject("winmgmts:\\" & strComputer &"\root\cimv2")=20
'<STRONG>(*)</STRONG></FONT></DIV>
<DIV><FONT face=3DArial color=3D#ff0000 size=3D2> If =
Err.Number >=20
0 Then<BR> WScript.Echo strComputer =
& "=20
- Unable to connect to WMI. Error " & Err.Number & "-" =
&=20
Err.Description<BR> =20
Err.Clear<BR> Else<BR> =
=20
WScript.Echo strComputer & "Connect to WMI: =
OK!"<BR> End=20
If</FONT></DIV>
<DIV><FONT face=3DArial color=3D#ff0000 size=3D2>Next</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2>WMI, DCOM, COM+ services =
are running well=20
in all PCs. Domain Group Policy forces Windows Firewall in all PCs to =
open port=20
135 & 445.</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>There're times that WMI Connection =
to some PCs=20
cannot be successful because Domain Group Policy are not applied at the =
PCs. So=20
when the script runs, it stops at line (*) about 1 hour (If you choose=20
Properties at WMI Control in Computer Management, you will have to wait=20
a long time).</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>This issue occurs in all Wins XP SP2 =
& Wins 2K=20
SP4.</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>This issue can be solved by running =
command=20
"gpupdate /force" OR "secedit /refreshpolicy ..."</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2>I want to decrease time to =
wait PCs' WMI=20
unconnectable. I want to know whether a PC is connectable or =
not=20
immediately. There is any way?</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2>Thanks</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV></BODY></HTML>
------=_NextPart_000_01FA_01C5CB4A.58582FC0--