jadda Absent Member.
Absent Member.
400 views

how to fetch adapter or device name

Hi,

 I am cloning a Vm from template,I am adding NIC to Vm.To fetch device or adapter name(in linux it's like eth0,eth1....,in windows 'LocalAreaConnection1 ...) at present i am executing a VB script in Corresponding Vcenter server.The problem is The script is producing annymous  results,sometimes it is returning desired device name and sometimes not and Script execution taking 10 mins time.

 

I know that using Advanced search operation in OO,we can fetch device name or adapter name.Because using advanced search  i  am able to fetch CPU/Memory Hotadd limit.I have searched in VSphere SDK ,but  i didn't find any luck.Can anyone help me?

Labels (1)
Tags (2)
0 Likes
1 Reply
Micro Focus Expert
Micro Focus Expert

Re: how to fetch adapter or device name

Hi Jadda,
You can check this URL
http://ict-freak.nl/2011/03/27/powercli-host-networking-device-info/
I will give you an idea on how to use PowerShell (PowerCLI) to get MAC address details and then you can different windows wmi classes (like Win32_NetworkConnection, Win32_NetworkAdapter or Win32_NetworkAdapterConfiguration) and correlate between the values.
Other URLs that may be useful
http://community.spiceworks.com/scripts/show/1332-get-the-ip-and-mac-addresses-of-a-computer
http://stackoverflow.com/questions/10583535/get-wired-mac-address-from-computer-server
http://www.activexperts.com/admin/scripts/wmi/vbscript/0340/
Regards,
Mahmoud Ibrahim
https://www.itmthoughts.com
New version of Mahmoudthoughts witten by other IT experts
  • Say thanks by clicking the "Kudos! Star" which is on the left.

  • Make it easier for other people to find solutions, by marking my answer with "Accept as Solution" if it solves your issue.
  • 0 Likes
    The opinions expressed above are the personal opinions of the authors, not of Micro Focus. By using this site, you accept the Terms of Use and Rules of Participation. Certain versions of content ("Material") accessible here may contain branding from Hewlett-Packard Company (now HP Inc.) and Hewlett Packard Enterprise Company. As of September 1, 2017, the Material is now offered by Micro Focus, a separately owned and operated company. Any reference to the HP and Hewlett Packard Enterprise/HPE marks is historical in nature, and the HP and Hewlett Packard Enterprise/HPE marks are the property of their respective owners.