Parse description column into local script

BatchPatch Forums Home Forums BatchPatch Support Forum Parse description column into local script

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #12401
    Doug Fergusson
    Participant

    So $computer will pull the names from the hosts column into a local script.

    eg: cscript.exe c:\scripts\script.ps1 $computer

    But is there a way to pull any other columns? Eg Description or notes column?

    I’m writing a script to snapshot a server before patching, and the Vsphere name is not always the host name. So I’m wanting to pull from the description column.

    Tried $notes however it’s not standardised as BP that pulls hosts across as $computer.

    Thanks for any suggestions!

    #12402
    doug
    Moderator

    Deployment, Remote Command, and Local Command all support $notes, $notes2, $description, $category, and $location in addition to $computer

    When you say “Tried $notes however it’s not standardised as BP that pulls hosts across as $computer” I’m not quite sure what you mean.

    -Doug

    #12404
    Doug Fergusson
    Participant

    Thanks Doug,
    I’ll try it again.

    “When you say “Tried $notes however it’s not standardised as BP that pulls hosts across as $computer” I’m not quite sure what you mean.”

    Was simply outlining that the column hosts uses the variable $computer
    Which is different wording

    #12405
    Doug Fergusson
    Participant

    Hi Doug,

    $notes has worked!
    &
    $notes2 just outputted 2

    Thanks for putting together such an amazing product!

    also..

    Do you know if there is a way to change the icons to help differentiate different scripts added to the main GUI?

    #12406
    doug
    Moderator

    Oh ok, so you mean the column name is ‘Host’ but the variable name is $computer, not $host? Yeah, I can’t remember off the top of my head why we did this, but I think there was a good reason for it. I’ll follow up with the team to see if we can add an alias for $host, but I’m not sure if it will be doable or not.

    $notes2 works for the ‘Notes2’ column in the same way that $notes works for the ‘Notes’ column. I’m not quite sure what you mean when you say “$notes2 just outputted 2”.

    The icons used on the toolstrip can not be customized. There is a different icon for ‘local command’, ‘remote command’, ‘remote command (logged output)’ etc, but if you have two of the same type of command they cannot currently have different icons. We have been discussing adding the ability to customize per command, but it’s not currently possible, and I’m not sure if/when it will become possible. One thing you can do now that help eliminate the confusion is use ALT-LeftClick drag to move icons around on the toolstrip, so that you can customize the order of icons however you want. This way you can separate the buttons to help eliminate the confusion of having two same icons right next to each other.

Viewing 5 posts - 1 through 5 (of 5 total)
  • You must be logged in to reply to this topic.