Board index » Visual Studio » Newbie - Computer String

Newbie - Computer String

Visual Studio316
Microsoft gives plenty of examples below to access the local PC. Is there a

direct equivalent object to access all PCs in a domain?



strComputer = "."

Set objWMIService = GetObject("winmgmts:" ....


-
 

Re:Newbie - Computer String



"itsme" <tnguyen@pmi.delta.org>wrote in message

Quote
Microsoft gives plenty of examples below to access the local PC. Is there

a

direct equivalent object to access all PCs in a domain?



strComputer = "."

Set objWMIService = GetObject("winmgmts:" ....



Not a direct equivalent. Your script needs to come up with a list of all

PC's in the domain, and execute the above WMI coding with strComputer set to

each PC name in turn. One way to do this would be to use ADSI to enumerate

the computers in the domain.



/Al





-