MartyConnelly
martyconnelly at shaw.ca
Fri Apr 29 01:15:07 CDT 2005
Here is a vbs script to dump all this type of info for a domain via wmi
into excel using ado, you could rewrite for access vba
Assumes ADS domain
http://www.rlmueller.net/Inventory.htm
or using something like ADSI
Searches for all computers that begin with the letters, "ATL" in a
domain and any child domains.
Then, modifies the location attribute of all computers in the result set.
Set objConnection = CreateObject("ADODB.Connection")
objConnection.Open "Provider=ADsDSOObject;"
Set objCommand = CreateObject("ADODB.Command")
objCommand.ActiveConnection = objConnection
objCommand.CommandText = _
";" & _
"(&(objectCategory=Computer)(cn=ATL*));" & _
"ADsPath;subtree"
Set objRecordSet = objCommand.Execute
While Not objRecordset.EOF
strADsPath = objRecordset.Fields("ADsPath")
Set objComputer = GetObject(strADsPath)
objComputer.Put "location", "Atlanta, Georgia"
objComputer.SetInfo
objRecordSet.MoveNext
Wend
WScript.Echo objRecordSet.RecordCount & _
" computers objects modified."
objConnection.Close
Lembit Soobik wrote:
>Does anybody know how to get all computer names in the network?
>thank you
>
>Lembit
>
>_______________________________________________
>AccessD mailing list
>AccessD at databaseadvisors.com
>http://databaseadvisors.com/mailman/listinfo/accessd
>Website: http://www.databaseadvisors.com
>
>
>
--
Marty Connelly
Victoria, B.C.
Canada