![]() |
![]() | ![]() | ![]() | ![]() | ![]() | ![]() | ![]() |
| 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. |
| |||||||
![]() |
| |
| | #1 (permalink) |
| | Retrieve information of a remote machine in vbscript At first a beg your pardon for my poor English...And also I'm new in vbscripting... My Question: It's possible to retrieve information like Operating System characteristics, Video, Processor, Disk space (free and total) for example of a remote machine into a domain and put this information in Access tables with Access vb script? I would like to be able to do a machine inventory by net putting the information in access 2007 to work it. I have tried it in WSH and in Access but I always have system messages like "User without permissions..." or "RPC server is not in use...". I use a user with Domain Administrator permissions. I have catched the examples in the Script Center and in Hey, Scripting Guy! sites... Someone can give me ideas? Someone have examples in access? Thank you all in advance. -- Vicens Ferran Net Administrator |
My System Specs![]() |
| | #2 (permalink) |
| | Re: Retrieve information of a remote machine in vbscript "Vicens Ferran" <vferran@xxxxxx> wrote in message news:0CAAC2D5-AB3F-40D8-A762-8B3C6888A4CB@xxxxxx Quote: > At first a beg your pardon for my poor English...And also I'm new in > vbscripting... > > My Question: It's possible to retrieve information like Operating System > characteristics, Video, Processor, Disk space (free and total) for example > of > a remote machine into a domain and put this information in Access tables > with > Access vb script? I would like to be able to do a machine inventory by net > putting the information in access 2007 to work it. > > I have tried it in WSH and in Access but I always have system messages > like > "User without permissions..." or "RPC server is not in use...". I use a > user > with Domain Administrator permissions. > > I have catched the examples in the Script Center and in Hey, Scripting > Guy! > sites... > > Someone can give me ideas? Someone have examples in access? > > Thank you all in advance. > -- > Vicens Ferran > Net Administrator |
My System Specs![]() |
| | #3 (permalink) |
| | Re: Retrieve information of a remote machine in vbscript Thank you a lot... I've seen the link and think very, very useful...Thanks... But I've resolved my problem. I was executing scripts in a machine out of the domain (my personal notebook). When I've done it in a domain's machine them have executed without problems. Thank you very much -- Vicens Ferran Net Administrator "Pegasus (MVP)" wrote: Quote: |
My System Specs![]() |
| | #4 (permalink) |
| | Re: Retrieve information of a remote machine in vbscript Vicens Ferran wrote: Quote: > At first a beg your pardon for my poor English...And also I'm new in > vbscripting... > > My Question: It's possible to retrieve information like Operating System > characteristics, Video, Processor, Disk space (free and total) for example > of > a remote machine into a domain and put this information in Access tables > with > Access vb script? I would like to be able to do a machine inventory by net > putting the information in access 2007 to work it. > > I have tried it in WSH and in Access but I always have system messages > like > "User without permissions..." or "RPC server is not in use...". I use a > user > with Domain Administrator permissions. > > I have catched the examples in the Script Center and in Hey, Scripting > Guy! > sites... > > Someone can give me ideas? Someone have examples in access? > remote computers must be Windows 2000 or above (or have WMI installed) and you should be a member of a group (like Domain Admins) that is local administrator on the remote computers (Domain Admins is a member of the local Administrators group by default when computers join the domain). A brief example (based on an example from the Script Center) to retrieve Operating System information and echo to the command console: =========== ' Specify NetBIOS name of the remote computer. strComputer = "TestComputer" Set objWMIService = GetObject("winmgmts:" _ & "{impersonationLevel=impersonate}!\\" _ & strComputer & "\root\cimv2") Set colOSes = objWMIService.ExecQuery("Select * from Win32_OperatingSystem") For Each objOS in colOSes Wscript.Echo "Computer Name: " & objOS.CSName Wscript.Echo "Caption: " & objOS.Caption 'Name Wscript.Echo "Version: " & objOS.Version 'Version & build Wscript.Echo "Build Number: " & objOS.BuildNumber 'Build Wscript.Echo "Build Type: " & objOS.BuildType Wscript.Echo "OS Type: " & objOS.OSType Wscript.Echo "Other Type Description: " & objOS.OtherTypeDescription WScript.Echo "Service Pack: " & objOS.ServicePackMajorVersion & "." & _ objOS.ServicePackMinorVersion Next ========= If you can't get the above to work, then either you are blocked by a firewall, DCOM is disabled, you lack connectivity, you lack permissions, or WMI is corrupt (either on your computer or the remote computer). I don't code Access, but I have an example VBScript program that documents all computers in the domain to a Microsoft Excel spreadsheet linked here: http://www.rlmueller.net/Inventory.htm I believe the are WMI classes for all of the properties you mentioned, so they can be retrieved using similar code. Besides the Script Center, these links to Microsoft Windows 2000 Scripting Guide should help: http://www.microsoft.com/technet/scr..._overview.mspx http://www.microsoft.com/technet/scr..._overview.mspx -- Richard Mueller MVP Directory Services Hilltop Lab - http://www.rlmueller.net -- |
My System Specs![]() |
| | #5 (permalink) |
| | Re: Retrieve information of a remote machine in vbscript Thank you a lot... All of you have given me very good ideas. Thank you for all... -- Vicens Ferran Net Administrator "Richard Mueller [MVP]" wrote: Quote: > Vicens Ferran wrote: > Quote: > > At first a beg your pardon for my poor English...And also I'm new in > > vbscripting... > > > > My Question: It's possible to retrieve information like Operating System > > characteristics, Video, Processor, Disk space (free and total) for example > > of > > a remote machine into a domain and put this information in Access tables > > with > > Access vb script? I would like to be able to do a machine inventory by net > > putting the information in access 2007 to work it. > > > > I have tried it in WSH and in Access but I always have system messages > > like > > "User without permissions..." or "RPC server is not in use...". I use a > > user > > with Domain Administrator permissions. > > > > I have catched the examples in the Script Center and in Hey, Scripting > > Guy! > > sites... > > > > Someone can give me ideas? Someone have examples in access? > > > You can use WMI in a VBScript program to retrieve this information. The > remote computers must be Windows 2000 or above (or have WMI installed) and > you should be a member of a group (like Domain Admins) that is local > administrator on the remote computers (Domain Admins is a member of the > local Administrators group by default when computers join the domain). A > brief example (based on an example from the Script Center) to retrieve > Operating System information and echo to the command console: > =========== > ' Specify NetBIOS name of the remote computer. > strComputer = "TestComputer" > > Set objWMIService = GetObject("winmgmts:" _ > & "{impersonationLevel=impersonate}!\\" _ > & strComputer & "\root\cimv2") > > Set colOSes = objWMIService.ExecQuery("Select * from Win32_OperatingSystem") > For Each objOS in colOSes > Wscript.Echo "Computer Name: " & objOS.CSName > Wscript.Echo "Caption: " & objOS.Caption 'Name > Wscript.Echo "Version: " & objOS.Version 'Version & build > Wscript.Echo "Build Number: " & objOS.BuildNumber 'Build > Wscript.Echo "Build Type: " & objOS.BuildType > Wscript.Echo "OS Type: " & objOS.OSType > Wscript.Echo "Other Type Description: " & objOS.OtherTypeDescription > WScript.Echo "Service Pack: " & objOS.ServicePackMajorVersion & "." & _ > objOS.ServicePackMinorVersion > Next > ========= > If you can't get the above to work, then either you are blocked by a > firewall, DCOM is disabled, you lack connectivity, you lack permissions, or > WMI is corrupt (either on your computer or the remote computer). > > I don't code Access, but I have an example VBScript program that documents > all computers in the domain to a Microsoft Excel spreadsheet linked here: > > http://www.rlmueller.net/Inventory.htm > > I believe the are WMI classes for all of the properties you mentioned, so > they can be retrieved using similar code. Besides the Script Center, these > links to Microsoft Windows 2000 Scripting Guide should help: > > http://www.microsoft.com/technet/scr..._overview.mspx > > http://www.microsoft.com/technet/scr..._overview.mspx > > -- > Richard Mueller > MVP Directory Services > Hilltop Lab - http://www.rlmueller.net > -- > > > |
My System Specs![]() |
![]() |
| Thread Tools | |
| |
Similar Threads | ||||
| Thread | Forum | |||
| Execute vbscript using cscript.exe on remote machine using Powershell | PowerShell | |||
| Retrieve U3 Usb Information | Drivers | |||
| Retrieve memory information | VB Script | |||
| Retrieve Windows System Information. | .NET General | |||
| "Couldn't get process information from remote machine" | Vista performance & maintenance | |||