update vmware tool after patching windows hosts

BatchPatch Forums Home Forums BatchPatch Support Forum update vmware tool after patching windows hosts

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #14296
    michaelb
    Participant

    Hello,
    i have a file in which 20 hosts are entered. Each host is patched with a task scheduler. All hosts have the same task. Now I want to add a “local command” to the end of the task. This should now call a PS script that updates the vmware tools. To do this, I want to read the host name from the line and write it into a PS variable. I want to use this variable in a separate PS script to update the vmware tools. Maybe I can run the “local command” with a parameter that can pass the hostname to my PS script? Now my question is, is this possible, and if so, how?

    Thanks
    Michael

    #14298
    doug
    Moderator

    FYI in case there was any confusion I just want to note that a “local command” in BatchPatch will execute on the BatchPatch computer. A “remote command” in BatchPatch will execute on the target computer.

    Use $computer as the parameter in the command. When BatchPatch sees $computer in the command, it will replace it with the computer name from the Host column when it executes the command.

    A couple of examples of this are shown in the following tutorials:

    advanced-script-integration-with-batchpatch

    incorporating-custom-scripts-in-batchpatch-get-local-administrators-group-membership

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