BatchPatch Forums Home › Forums › BatchPatch Support Forum › Parse description column into local script
Tagged: Execute Local Process
- This topic has 4 replies, 2 voices, and was last updated 4 years, 5 months ago by doug.
-
AuthorPosts
-
July 15, 2020 at 11:40 pm #12401Doug FergussonParticipant
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!
July 16, 2020 at 12:02 am #12402dougModeratorDeployment, 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
July 16, 2020 at 12:15 am #12404Doug FergussonParticipantThanks 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 wordingJuly 16, 2020 at 1:20 am #12405Doug FergussonParticipantHi Doug,
$notes has worked!
&
$notes2 just outputted 2Thanks 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?
July 16, 2020 at 1:56 am #12406dougModeratorOh 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.
-
AuthorPosts
- You must be logged in to reply to this topic.