Thema
|
Datum
|
Von Nutzer
|
Rating
|
Antwort
|
|
23.11.2019 07:01:10 |
Harald |
|
|
|
23.11.2019 08:49:36 |
Gast95447 |
|
|
|
23.11.2019 08:56:31 |
Gast15669 |
|
|
Steuerung von dritt Programmen - Tasten übergabe |
23.11.2019 10:35:53 |
Gast54186 |
|
|
Von:
Gast54186 |
Datum:
23.11.2019 10:35:53 |
Views:
616 |
Rating:
|
Antwort:
|
Thema:
Steuerung von dritt Programmen - Tasten übergabe |
https://sites.google.com/site/beyondexcel/project-updates/exposingsystemsecretswithvbaandwmiapi
Sub WMI()
Dim oWMISrvEx As Object 'SWbemServicesEx
Dim oWMIObjSet As Object 'SWbemServicesObjectSet
Dim oWMIObjEx As Object 'SWbemObjectEx
Dim oWMIProp As Object 'SWbemProperty
Dim sWQL As String 'WQL Statement
Dim n As Long 'Generic Counter
sWQL = "Select * From Win32_NetworkAdapterConfiguration"
Set oWMISrvEx = GetObject("winmgmts:root/CIMV2")
Set oWMIObjSet = oWMISrvEx.ExecQuery(sWQL)
For Each oWMIObjEx In oWMIObjSet
'Put a STOP here then View > Locals Window to see all properties
If Not IsNull(oWMIObjEx.IPAddress) Then
Debug.Print "IP:"; oWMIObjEx.IPAddress(0)
Debug.Print "Host name:"; oWMIObjEx.DNSHostName
For Each oWMIProp In oWMIObjEx.Properties_
If IsArray(oWMIProp.Value) Then
For n = LBound(oWMIProp.Value) To UBound(oWMIProp.Value)
Debug.Print oWMIProp.Name & "(" & n & ")", oWMIProp.Value(n)
Next
Else
Debug.Print oWMIProp.Name, oWMIProp.Value
End If
Next
End If
Next
End Sub
Want to see more?
Here is a workbook that facilitates exploring several hundred classes containing information about our CPU, disk drives, memory, operating system, applications, users, and much, much more. And it can query remote PCs and servers too, assuming you have the credentials.
WMI Query.xlsm: https://www.dropbox.com/s/908851y0esoqtge/WMI%20Query.xlsm?dl=1
Uses for WMI Query.xlsm
Inventory all PCs in a network including all hardware and software using:
Win32_SystemEnclosure - PC's Manufacturer and Serial Number
Win32_LogicalDisk - Disks with capacities and free space.
Win32_Processor - CPU Specs
Win32_PhysicalMemoryArray - RAM/Installed Memory size
Win32_VideoController - Graphics adapter and settings
Win32_OnBoardDevice - Motherboard devices
Win32_OperatingSystem - Which version of Windows with Serial Number
WIn32_Printer - Installed Printers
Win32_Product - Installed Software
WIn32_Account - List all User Accounts on a PC or Domain
Win32_ComputerSystem - See who is currently using a remote PC (also Win32_LoggedOnUser)
Win32_BaseService - List services running (or stopped) on any PC along with the service's path and file name.
And hundreds more!
|
- Bitte beschreiben Sie Ihr Problem möglichst ausführlich. (Wichtige Info z.B.: Office Version, Betriebssystem, Wo genau kommen Sie nicht weiter)
- Bitte helfen Sie ebenfalls wenn Ihnen geholfen werden konnte und markieren Sie Ihre Anfrage als erledigt (Klick auf Häckchen)
- Bei Crossposting, entsprechende Links auf andere Forenbeiträge beifügen / nachtragen
- Codeschnipsel am besten über den Code-Button im Text-Editor einfügen
- Die Angabe der Emailadresse ist freiwillig und wird nur verwendet, um Sie bei
Antworten auf Ihren Beitrag zu benachrichtigen
Bitte geben Sie ein aussagekräftiges Thema an.
Bitte geben Sie eine gültige Email Adresse ein!
- Bitte beschreiben Sie Ihr Problem möglichst ausführlich. (Wichtige Info z.B.: Office Version, Betriebssystem, Wo genau kommen Sie nicht weiter)
- Bitte helfen Sie ebenfalls wenn Ihnen geholfen werden konnte und markieren Sie Ihre Anfrage als erledigt (Klick auf Häckchen)
- Bei Crossposting, entsprechende Links auf andere Forenbeiträge beifügen / nachtragen
- Codeschnipsel am besten über den Code-Button im Text-Editor einfügen
- Die Angabe der Emailadresse ist freiwillig und wird nur verwendet, um Sie bei
Antworten auf Ihren Beitrag zu benachrichtigen
Thema
|
Datum
|
Von Nutzer
|
Rating
|
Antwort
|
|
23.11.2019 07:01:10 |
Harald |
|
|
|
23.11.2019 08:49:36 |
Gast95447 |
|
|
|
23.11.2019 08:56:31 |
Gast15669 |
|
|
Steuerung von dritt Programmen - Tasten übergabe |
23.11.2019 10:35:53 |
Gast54186 |
|
|