Hi,
I'm pretty new to open audit but here is what I use to export almost all I need to populate an old custom made DB for inventory This uses powershell for VMware (AKA PowerCLI) and works on ESXi or vcenter. It dumps all the data in c:\scripts\export in CSV format.
I'm pretty sure that I could work on something as soon as I understand how OpenAudit work
[code] Add-PSSnapin VMware.VimAutomation.Core; connect-viserver <your_ESXi_IP_or_dns>;
Get-VM | Select Id, Name, PowerState, Folder, ResourcePool, NumCpu, MemoryMB, PersistentId, UsedSpaceGB, ProvisionedSpaceGB, VMHost, VApp, FolderId, Version, Notes, HARestartPriority, HAIsolationResponse, DrsAutomationLevel, VMSwapfilePolicy, VMResourceConfiguration | export-csv -NoTypeInformation c:\Scripts\Export\vm.csv
Get-VM | Get-VMGuest | Select VmName, OSFullName, State, HostName, ScreenDimensions | export-csv -NoTypeInformation c:\Scripts\Export\vm_Guest.csv
Get-VM | Get-HardDisk | Select Parent, Filename, Name, CapacityKB, StorageFormat, Persistence, DiskType | export-csv -NoTypeInformation c:\Scripts\Export\vm_HDD.csv
Get-VM | Get-NetworkAdapter | Select Parent, Name, MacAddress, Type, NetworkName, ConnectionState, WakeOnLanEnabled | export-csv -NoTypeInformation c:\Scripts\Export\vm_NetworkAdapter.csv
Get-Datastore | Select Name, Datacenter, CapacityMB, FreeSpaceMB, Accessible, Type, ParentFolder | export-csv -NoTypeInformation c:\Scripts\Export\Datastore.csv
Get-VMHost | Select Name, Id, Version, State, ConnectionState, PowerState, VMSwapfileDatastoreId ,VMSwapfilePolicy ,ParentId ,IsStandalone ,Manufacturer ,Model ,NumCpu ,CpuTotalMhz ,CpuUsageMhz ,MemoryTotalMB ,MemoryUsageMB ,ProcessorType ,HyperthreadingActive, TimeZone, ApiVersion, DiagnosticPartition | export-csv -NoTypeInformation c:\Scripts\Export\VMHost.csv
Get-vmHost | Get-VMHostHba | Select VMHost, Name, Device, Model, Pci, Driver, Bus, Status, Type | export-csv -NoTypeInformation c:\Scripts\Export\VMHost_HBA.csv
Get-VMHost | Get-VMHostNetworkAdapter | Select VMHost, Name, Mac, DhcpEnabled, IP, SubnetMask, BitRatePerSec, FullDuplex, WakeOnLanSupported | export-csv -NoTypeInformation c:\Scripts\Export\VMHost_NetworkAdapter.csv [/code]
|