some problems with get-esxcli

Hi, I'm trying to write a script to configure esxi servers who will find the exact number of iscsi software adapters vmhba and then add the vmknics them to configure multiple paths (i.e. esxcli swiscsi nic add - n vmk2 d vmhba37, but the number of vmhba will vary between servers).

Initially, I want just the network cards connected to the adapter to a server that is already configured for test purposes, so I ran the list

# Find the correct vmhba of iscsi software adapter

$HBANumber = get-VMHost $vmhost | Get-VMHostHba | where {$_.} {Model - like "adapter software iSCSI"} | Select the device
# list the nic with iscsi adapter
$esxCli = get-EsxCli - Server $vmhost
$esxCli.swiscsi.nic.list ("$HBANumber")

I got the error:

The remote server returned an error: (500) internal server error.

On line: 1 char: 25

+ $esxCli.swiscsi.nic.list < < < < ($HBANumber)

+ CategoryInfo: InvalidOperation: (:)) [], RuntimeException)

+ FullyQualifiedErrorId: MethodInvocationException

I worked on that my line of $HBANumber in my script returns another text than just vmhbaxx:

[vSphere PowerCLI] C:\Program Files\VMware\Infrastructure\vSphere PowerCLI > Write-Host $HBANumber

@{Device = vmhba39}

How can I fix so that the first line of my script returns only vmhbaxx and not the @{device = party?}

Thank you

You want just the value (vmhba39) of the object.

Try to change this line to

$HBANumber = get-VMHost $vmhost | Get-VMHostHba | where {$_.} {Model - like "adapter software iSCSI"} | %{$_. Device}
The value returned in $HBANumber can be a single value or an array of values (if you have more than 1 defned iSCSI adapter).
If you have a table, you must call EsxCli in a loop
$HBANumber | %{
$esxCli.swiscsi.nic.list("$_")
}
If you want a script that manages a single HBA such as a table, you could do
$HBANumber = @(Get-VMHost $vmhost | Get-VMHostHba | where {$_.Model -like "iSCSI Software Adapter"} | %{$_.Device})

In this way force you, even if it's a single HBA, the line to always return an array.

Tags: VMware

Similar Questions

  • Sierra Siri, «I have some problems with the connection...» »

    Guys,

    I just installed Sierra on my MacBook Pro (retina, 13 inches, early 2015) version 10.12. I can't get Siri at work, the app tracks, he hears what I'm saying, but after awhile, he returns with two messages, both on the screen and verbally "I have some problems with the internet connection. Please try again in a moment. "&"Sorry, I'm having problems with the connection. Please try again in a moment. »

    Any ideas?

    Thank you

    N

    It's a network problem.

    Check the proxy settings that blocks maybe, or a firewall.

    System Preferences > network > Advanced (for your current connection) > Proxies

    Something there?

  • Some problems with Toshiba TV 47L 6453

    Hello

    I have some problems with this TV, as follows

    -I need to re tune the tv several times a day to receive a complete list of channels.
    -The guide shows a TNT channel with program information, when a program is selected, I get a message indicating that the channel can not be tuned. However when I touch the channel it displays the string correctly.
    -Program data is not displayed on several channels. Sometimes this can be improved in re-tuning.

    Can I have a TV that is defective, or is it considered normal for this toshiba tv. I have a lot running off the same ariel who doesn't have these problems of adjustment so I know that it's not that older television.

    Any help here then. Just to add insult the YouTube app decided to stop working. This TV keeps guessing you as to what will work on any given day.
    Without a doubt the worst little waste tech, I had the misfortune to buy for many years. It has a large image. Such a shame, he struggles to view freeview channels, or smart TV applications.
    I will never buy an another Toshiba product again. The previous 7 years tv, that I had to be upgraded is far superior to this piece of unreliable junk. Hope this helps someone to make a wise buying decision. Do not buy this TV and become another victim of toshiba.

  • I restored my laptop Toshiba because I had some problems with it and now my Windows Vista computer is indicating that it is 'invaild.

    RESTORED FOR LAPTOP, WINDOWS VISTA INVAILD

    Hi I'm new to these fornums

    I restored my laptop Toshiba because I had some problems with it and now my Windows Vista computer is indicating that it is 'invaild...

    I have the product key on a sticker on the bottom of the laptop, but whenever I entered the code, I also get this:

    The product key you entered will not work with this edition of Vista

    I know that most people are trying to say to activate by phone, but this option is not available

    Help, please

    Now that you have found the key and the certificate of authenticity, you must change to the key on the COA sticker - ONLY then it will activate.

  • I have some problems with a ONE_TO_MANY relationship, can not insert the record

    I have some problems with a ONE_TO_MANY relationship:

    Imagine the following entities:

    -J' have an operational entity with a relationship to workers one_to_many something like:
    @SecondaryKey(relate = Relationship.ONE_TO_MANY,
        relatedEntity = Worker.class)
        private Set<String> workers;
    -The category of workers is a simple annotated entity.


    Now, I want to do the following and I get the error:

    -Create a bunch of tasks
    -Insert tasks into the entitystore
    -create a set containing all the tasks of primary key
    -involve workers to tasks
    -Insert the task in the database


    The above procedure works fine, but when I try to associate the same set of workers with another task I get an exception like:
    com.sleepycat.je.DatabaseException: (JE 3.3.75) Could not insert secondary key in persist#Sample#sample.Task#workers OperationStatus.KEYEXIST
            at com.sleepycat.je.SecondaryDatabase.insertKey(SecondaryDatabase.java:887)
            at com.sleepycat.je.SecondaryDatabase.updateSecondary(SecondaryDatabase.java:807)
            at com.sleepycat.je.SecondaryTrigger.databaseUpdated(SecondaryTrigger.java:42)
            at com.sleepycat.je.Database.notifyTriggers(Database.java:1735)
            at com.sleepycat.je.Cursor.putInternal(Cursor.java:1368)
            at com.sleepycat.je.Cursor.putNoOverwrite(Cursor.java:498)
            at com.sleepycat.persist.PrimaryIndex.put(PrimaryIndex.java:366)
            at com.sleepycat.persist.PrimaryIndex.put(PrimaryIndex.java:315)
    Can someone please clarify what my problem is and where I should change for this case study work?

    Thank you

    The above procedure works fine, but when I try to associate the same set of workers with another task I get an exception like:

    The table in this javadoc should help. Please think about whether they are 1 of many, many 1 or many is the appropriate link.

    http://www.Oracle.com/technology/documentation/Berkeley-DB/je/Java/COM/Sleepycat/persist/model/SecondaryKey.html#relate)

    -mark

  • Some problems with custom skin

    Hello

    I have created custom skin and I have some problems with it.

    (* 1) as you can see on [this image | http://www.zilp.pl/z/test01/Members/jakubp/Folder.2007-06-22.2113643678/File.2008-09-29.7372305410] item of Navigation within the Navigation pane command appears quite a color must be white, but gets by default the font for application (dark green) color. *
    My definition of the skin is the following:

    / * NAVIGATION PANE * /.
    AF | navigationPane - tabs:tab - start {(background-image: url('/skins/zilprcskin/img/tab-start.gif'); width: 4px ;}}
    AF | navigationPane - tabs:tab - end {(background-image: url('/skins/zilprcskin/img/tab-end.gif'); width: 4px ;}}
    AF | navigationPane content tabs::tab {(background-image: url('/skins/zilprcskin/img/tab-content.gif') ;}}
    AF | navigationPane - tabs:tab:hover af | navigationPane - tabs:tab - start {(background-image: url('/skins/zilprcskin/img/tab-start.gif'); width: 4px ;}}
    AF | navigationPane - tabs:tab:hover af | navigationPane - tabs:tab - end {(background-image: url('/skins/zilprcskin/img/tab-end.gif'); width: 4px ;}}
    AF | navigationPane - tabs:tab:hover af | navigationPane content tabs::tab {(background-image: url('/skins/zilprcskin/img/tab-content.gif') ;}}

    AF | navigationPane - tabs:tab: selected af | navigationPane - tabs:tab - start {(background-image: url('/skins/zilprcskin/img/tab-start-selected.gif'); width: 4px ;}}
    AF | navigationPane - tabs:tab: selected af | navigationPane - tabs:tab - end {(background-image: url('/skins/zilprcskin/img/tab-end-selected.gif'); width: 4px ;}}
    AF | navigationPane - tabs:tab: selected af | navigationPane content tabs::tab {(background-image: url('/skins/zilprcskin/img/tab-content-selected.gif') ;}}
    AF | navigationPane - tabs:tab: selected: hover af | navigationPane - tabs:tab - start {(background-image: url('/skins/zilprcskin/img/tab-start-selected.gif'); width: 4px ;}}
    AF | navigationPane - tabs:tab: selected: hover af | navigationPane - tabs:tab - end {(background-image: url('/skins/zilprcskin/img/tab-end-selected.gif'); width: 4px ;}}
    AF | navigationPane - tabs:tab: selected: hover af | navigationPane content tabs::tab {(background-image: url('/skins/zilprcskin/img/tab-content-selected.gif') ;}}
    AF | navigationPane - tabs:tab {margin right: 2px ;}}
    AF | navigationPane - tabs:tab - link {color: #ffffff; make-weight: bold ;}}
    AF | navigationPane - tabs:tab - link: hover {color: Red; make-weight: bold ;}}
    AF | navigationPane - tabs:tab: selected af | navigationPane - tabs:tab - link {color: #ffffff}

    (* 2) as you can see on [this image | http://www.zilp.pl/z/test01/Members/jakubp/Folder.2007-06-22.2113643678/File.2008-09-29.7372305410] menu scroll icons displayed twice: my and by default (rich). My definition of the skin is the following: *.

    / * MENU * /.
    AF | menu {- tr - visible elements: 2 ;}}
    AF | menu: depressed.
    AF | menu: stressed {(background-image:url('/skins/zilprcskin/img/menuHighlighted.gif') ;}}
    AF | : bar menu-point-text {color: White; make-weight: bold ;}}
    AF | menu: highlight: bar-point-text {color: #CEFFF1 ;}}
    AF | menu: bar-point-open-icon {(content:url('/skins/zilprcskin/img/small-arrow-down.gif'); margin-left: 2px ;}}
    AF | menu: go to the top icon {(content:url('/skins/zilprcskin/img/small-arrow-up.gif') ;}}
    AF | menu: go to the bottom-icon {(content:url('/skins/zilprcskin/img/small-arrow-down.gif') ;}}
    AF | : submenu of the menu-open-icon {(content:url('/skins/zilprcskin/img/small-arrow-right.gif') ;}}
    AF:menu:bar - point-text {make-weight: bold ;}}
    AF | commandMenuItem:menu - point-icon-style,
    AF | : submenu of the menu-icon-style {background-color: #a1caca; border: none ;}}
    AF | commandMenuItem: highlight: menu - item text.
    AF | commandMenuItem: highlight: menu-point-Accelerator,.
    AF | commandMenuItem: highlight: menu-point-open-indicator.
    AF | menu: highlight: submenu text,.
    AF | menu: highlight: submenu-Accelerator,.
    AF | menu: highlight: submenu Open indicator {background-color: #a1caca; border: none ;}}

    (* 3) as you can see on [this image | http://www.zilp.pl/z/test01/Members/jakubp/Folder.2007-06-22.2113643678/File.2008-10-01.6059969354] I also have a problem with default Panel box. Header font color should be white and ago strange empty space in header: *.

    / * DEFAULT CORE BOX PANEL * /.
    . AFPanelBoxHeaderCoreDefault:alias {color: #ffffff ;}}
    AF | panelBox::content:core:default {border-color: #149492 ;}}
    AF | panelBox:header - departure: kernel: default {(background-image: url('/skins/zilprcskin/img/tab-start.gif') ;}}
    AF | panelBox:header - Centre: kernel: default {(background-image: url('/skins/zilprcskin/img/tab-content.gif') ;}}
    AF | panelBox:header - end: core: default {(background-image: url('/skins/zilprcskin/img/tab-end.gif') ;}}

    Kuba

    Hello Kuba,

    I have a quick look in your message. For the moment I can solve one of your questions. The text of the panelBox header that you use skin:

     af|panelBox::header-element { color:White; } 
    

    Is on the white space, the 'skins/zilprcskin/img/tab-start.gif' image enough width? I use the same selectors (af | panelBox:header - departure: kernel: default af | panelBox:header - Centre: core: by default, af | panelBox:header - end: core: by default) and it works for me (but I'm not using an image, the only background color). Probably you need to change the width of header-early, restricting the scope and the lengthening of the Center header.

    As Simon said, Firebug is very useful to do this :)

    JVN

  • Satellite A500-1HK: some problems with ECO Utility, touchpad, GPU

    Hi all!

    I am facing some problems with my laptop A500-1HK AND I would like to have your opinion!

    last month, the eco Utility application cannot be activated from the special keyboard of the botton at the bottom of the keyboard, although Ihear special sound because its touch botton (so it works fine). I can activate only in the start menu and then the botton in the keyboard touch would become green.

    At the top of the touchpad (mouse), there is a botton that enable / disable the touchpad. It works again.

    A few times when I'm working, the screen turns black and then after 5-7 seconds, that it becomes normal with a message that nvidia GeForce GT 330Μ had stop working but now works well! (is it something serious?)

    On the taskbar, there is an icon with a yellow exclamation point indicating the function that intel RST does not work. What is c?

    Keep in mind I have install all the drivers to the latest version, but nothing has changed! I have windows 7 64 bit GR

    Thanks in advance!

    > last month, the eco Utility application cannot be activated from the special keyboard of the botton at the bottom of the keyboard, although Ihear special sound because its touch botton (so it works fine). I can activate only in the start menu and then the botton in the keyboard touch would become green.

    Go to-> programs and features Control Panel
    Here are looking for ECO Utility and uninstall this software and restart the laptop

    Then visit the Toshiba UE driver page and look for the ECO utility.
    Download the software and reinstall it.

    > A few times when I'm working, the screen turns black and then after 5-7 seconds, it becomes normal with a message that nvidia GeForce GT 330? a work stoppage, but now works fine! (is it something serious?)

    The same as the ECO utility. Uninstall the screen / graphic card driver
    Download the latest driver from the Toshiba page and install it

    > To the task bar, there is an icon with a yellow exclamation point indicating the function that intel RST does not work. What is c?

    TSRI means Intel Rapid Storage Manager. It contains the SATA driver for SATA HDD controller.
    In case this does not work, reinstall it again.

  • I had some problems with my pc, since then when I close Firefox it would not reopen unless I go to Task Manager and end the process for FF.

    I had some problems with my pc, since then when I close Firefox it would not reopen unless I go to Task Manager and end the process for FF. I uninstalled FF and re-installed and no change.
    Walt

    I have a same problem.

  • Some problems with the Satellite A210 - 11 p

    I bought my laptop Satellite A210 - 11 p in September last year, but over the few months Ive had some problems with it.

    1. it seems to be overheating to the point of not being able to touch the bottom of the laptop whose total stop me use it as a laptop. Is - this usual?

    2. the screen turns off after approximately 2 minutes after the connection.

    3. any ideas where I can buy a new charger?

    Can you help me?

    Thank you
    Mike

    1 could be an accumulation of dust in the radiator. An FSL can remove it for you, or you can blow with a can of compressed air.
    2 power settings? Perhaps the Toshiba Power Saver is set to decrease intensity when loading in the system tray.
    3. I think an ASP can sell you a.

  • Some problems with Toshiba 40LV933G using the Serbian language settings

    Hello

    I have Toshiba 40LV933g TV a few months already.
    The firmware version is finally a 1.00.08.
    And I have some problems with it, which I think can be corrected in some of the new firmwares (if there is one).

    First of all, when I select Serbian language 'Move' in media player is not translated.

    Secondly when I select the Serbian country in the menu I can't automatically scan for DTV and ATV ATV just of channels.

    Third and the greatest problem is medial Player do not support these last Serbian latin in subbtitles as:? šŠ?? žŽ
    and there is no possibility of changing the size of this last subbtitle. Things like this other brands are already supported.
    * also the time between changing channels is long enough *.

    Best regards.

    I noticed the same problem with subtitle on my TV Toshi when I use the media player (movie recorded on USB key). These Latin letters are not displayed correctly.

    I also hope that this can be corrected with new firmware.

    By the way: do you know where you can download the latest version of the firmware?

  • Someone at - he had or having problems with getting nVidia NVS 450 working resolution?

    Hi all

    We got a new C20 with a nvidia NVS 450 card - and a $ monitor. The C20 has Windows 7 preinstalled; the out-of-the-box resolution is 640 x 480 and we couldn't make it go higher than that! The $ and the video card are connected via the DisplayPort cable that came with the unit. After you have reinstalled the video card driver that comes with the unit (on a CD containing drivers for Windows and Linux), we could never get to go beyond 640 x 480 resolution. We left thinking that it must be a quirk with Windows 7. We were going to install Linux on the C20 anyway, so we moved on this.

    We installed Fedora 14 (64-bit) install the video driver nvidia who was on the CD and cannot get the display resolution greater than 640 x 480. After a few days of tests n errors referring to various online forums, we have successful get resolution up to 800 x 600, but not the expected 1900 - something resolution the $ and video card holders.

    Someone at - he had problems with getting the resolution of the video card to work? If so, were you able to solve the problem? We thought we would start here instead to call Lenovo support first, because usually technical questions, we get smarter than over-the-phone responses. Also, waiting for answers on a forum is less frustrating than the vote by phone.

    Chris

    Thank you for your response.

    I had the chance to get their hands on another monitor, and when I plugged that, I got the full resolution. After a lot of testing, I decided that it was a faulty monitor and it had nothing to do with the video card. I finally got a replacement screen for the one who wasn't giving me the full resolution.

    Subsequently, I went ahead and got the latest drivers nvidia on their Web site. Everything works fine now.

  • Some problems with the construction of project in Eclipse

    I use js + css3, html5 in my project for smartphone.

    And I have problem (error) with a construction project.

    ---------

    [INFO] Parsing of the command line options
    [INFO] Bbwp.properties analysis
    [INFO] Validation of archive application
    [INFO] The analysis of config.xml
    [INFO] The application of filling source
    [ERROR] Feature is not found in any extension (blackberry.bbm.platform)
    BUILD CAME OUT WITH 1 ERROR

    ---------

    What should I do to fix this error?

    Thank you!

    Thank you!

    I accidentally duplicated the subject, and the problem was solved in http://supportforums.blackberry.com/t5/Web-and-WebWorks-Development/Some-problem-with-building-proje...

  • So, my cousins both got two netbooks for Christmas so I took it upon myself to put in place. However, I seem to have problems with getting Homegroup to work.

    original title: incorrect Homegroup password

    So, my cousins both got two netbooks for Christmas so I took it upon myself to put in place. However, I seem to have problems with getting Homegroup to work.

    All computers:
    Have enabled IPv6
    Use Microsoft Security Essentials with the last update
    Are connected to the same router (Linksys WRT54GX2)
    Have no other third-party firewalls or AV installed and have been neatly eliminated via their respective tools when they had their
    Can be seen in the network and can access any other files via 'network '.
    Have the correct date and time and are all in sync with time.nist.gov.
    Have the same network sharing settings (network discovery on, files and printers sharing folders public, sharing, streaming, wide, 128-bit encryption, sharing password protected, to allow windows to manage the homegroup connections)
    Network is set at home, not in public

    The computer that has implemented the homegroup is connected via ethernet to the router while other computers use to access the router 802.11 g I tried to delete and redo the residential group as well.

    Despite all this, it is said that the homegroup password is incorrect for both netbooks (where it says it has encountered an error). I realize that it is case sensitive and I entered the password correctly. I also ran the resolution of the problems of the homegroup on all 3 machines and still no luck. I also tried to change the password and restarting of machines.

    Any suggestions? I was _really_ hoping it will work right out of the box. Maybe it's something with the router? I don't really know. Any help is appreciated. Merry Christmas! : D

    Hello

    check out this link.

    http://Windows.Microsoft.com/en-us/Windows7/why-cant-I-create-a-HomeGroup

    http://Windows.Microsoft.com/en-us/Windows7/create-a-HomeGroup

  • Im having problems with getting my sound to work on windows 7 RC 7100 32 bit I tried to use 2 soundcards.

    original title: Audio does not work

    Problems of sound in windows 7

    Hey all. Thanks in advance for any time you spend to help me.

    Im having problems with getting my sound to work on windows 7 RC 7100 32 bit
    I tried to use 2 soundcards.

    1: creative X - FI Extreme
    for creative people, I tried using drivers creative Beats, creative version drivers and vista 32-bit drivers with no luck.

    2: its integrated with Intel DP35DP motherboard card
    7 drivers are available for intel sound I used vista 32 bit since no windows drivers.

    I have 3 device failed in the Device Manager. Simple PCI controller, peripheral Audio communications of high definition, Microsoft makes confidence audio drivers.

    the 3 rooms of this note.

    Windows cannot load the driver for this hardware device. The driver may be corrupted or missing. (Code 39)

    with or without pilots the warrning does not change.

    System Spec.

    Card mother Intel DP35DP
    3 GB ram
    Core 2 duo E8400 with
    ASUS Nvidia Geforce 8800gt
    Creative X - FI extreme pci / Intel integrated audio system
    Termaltake 600 watt Toughpower supply
    Pioneer dvd Sata burner

    Managed to solve this problem by installing the 64-bit windows 7 instead of 32 bits.

    not sure why the sound failed. but now its fixed.

  • I tried to install LR 6 of the CD. After some problems with my Adobe ID, I typed in my serial number, then he told me... OS is not fullfill is the requirements.my OS Win 7 64 bit system. can someone help me with this?

    I tried to install LR 6 of the CD. After some problems with my Adobe ID, I typed in my serial number, then he told me... OS is not fullfill is the requirements.my OS Win 7 64 bit system. can someone help me with this?

    See the link below:

    trying to install lightroom 6 on windows 7 continues to receive operating requirement not met windows vista not supported

Maybe you are looking for