Windows Vista Forums
Vista Forums Home Join Vista Forums Windows 7 Forum Vista Tutorials Tags
Welcome to Windows Vista Forums. Our forum is dedicated to helping you find solutions with any problems, errors or issues you are experiencing with Windows Vista. The Vista forum also covers news and updates and has an extensive Windows Vista tutorial section that covers a wide range of tips and tricks.

Go Back   Vista Forums > Misc Newsgroups > PowerShell

Vista - finding all machines on the network.

Reply
 
Old 09-19-2006   #1 (permalink)
klumsy@xtra.co.nz


 
 

finding all machines on the network.

context: i want to find all machines on our LAN and WAN and then from
that query them to their screen resolution, I am writing a query to
find out and summarize the different screen resolutions in use in our
organisation...

first attempt

(New-Object
DirectoryServices.DirectoryEntry("LDAP://CN=Computers,DC=whatever,DC=net")).get_children()
|
foreach {$comp = $_.cn ;get-WmiObject -computername $comp
Win32_DisplayConfiguration |
Select-Object (as computer , {$comp}, height, pelsheight , width ,
pelswidth) }

this works great, other than that our active directory is quite
incomplete and disorganised (b.t.w as a side querstion, is there a way
i can search through the whole of an active directory structure and
just get out all the computers in it (in comparision to users , groups
etc?)

anyhow i am thinking my next attempt is to get a list of all the
machines via DNS, anybody got an example script or technique of getting
a list of DNSs remotely from your win2k3 domain server with powershell?

Karl


My System SpecsSystem Spec
Old 09-19-2006   #2 (permalink)
James


 
 

Re: finding all machines on the network.

Use a filter, of course. "objectcategory=computer" Put that in
DirectorySearcher one the rootDSE and that will find all machines for you.

One thing to note, that will show all machines, not just computers but
servers as well. AD doesn't discriminate between the two.

james

klumsy@xtra.co.nz wrote:
> context: i want to find all machines on our LAN and WAN and then from
> that query them to their screen resolution, I am writing a query to
> find out and summarize the different screen resolutions in use in our
> organisation...
>
> first attempt
>
> (New-Object
> DirectoryServices.DirectoryEntry("LDAP://CN=Computers,DC=whatever,DC=net")).get_children()
> |
> foreach {$comp = $_.cn ;get-WmiObject -computername $comp
> Win32_DisplayConfiguration |
> Select-Object (as computer , {$comp}, height, pelsheight , width ,
> pelswidth) }
>
> this works great, other than that our active directory is quite
> incomplete and disorganised (b.t.w as a side querstion, is there a way
> i can search through the whole of an active directory structure and
> just get out all the computers in it (in comparision to users , groups
> etc?)
>
> anyhow i am thinking my next attempt is to get a list of all the
> machines via DNS, anybody got an example script or technique of getting
> a list of DNSs remotely from your win2k3 domain server with powershell?
>
> Karl
>

My System SpecsSystem Spec
Reply

Thread Tools


Similar Threads
Thread Forum
Network won't identify correct machines Network & Sharing
Finding Network Key? Vista networking & sharing
not finding your XP network Vista networking & sharing
Network Vista & XP machines Vista networking & sharing
Adding XP machines to a Vista network Vista networking & sharing


Vista Forums is an independent web site and has not been authorized,
sponsored, or otherwise approved by Microsoft Corporation.
"Windows Vista", the Start Orb, and related materials are trademarks of Microsoft Corp.
© Designer Media Ltd

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46