PowerCLI

  • 1.  Scheduled Tasks on several VMs

    Posted Feb 10, 2021 02:45 PM

    Hello everybody,

    I have a question about scheduled tasks - hopefully I'm in the right place for that kind of questions:

    Is it possible to assign a scheduled task to more than one vm in vCenter? Straight to the point: I want to reset several vms in the same folder at a specific time. But I can only find the option to do it one by one, which is a pain in the a** with about 100 vms within this folder.

    Thanks guys!

    Ben

     

     



  • 2.  RE: Scheduled Tasks on several VMs

    Posted Feb 10, 2021 03:57 PM

     

    This thread would probably be best placed in the PowerCLI area



  • 3.  RE: Scheduled Tasks on several VMs

    Posted Feb 10, 2021 05:43 PM

    moderator note: moved to VMware PowerCLI discussions.

    --
    Wil



  • 4.  RE: Scheduled Tasks on several VMs

    Posted Feb 10, 2021 05:54 PM

    There are no PowerCLI cmdlets to create a Scheduled Task.
    But you can easily call the CreateScheduledTask method from PowerCLI.
    I have some blog posts on the subject, for example Scheduled Tasks – MethodAction

    As you can read in the description of the CreateScheduledTask method "If the task is associated with a folder, a datacenter, a compute resource, or a resource pool, it applies to the virtual machine or host descendants of the entity"

    So it is a matter of finding an object under which those 100 vms are located.
    In your case that would be a Folder if I understand your question correctly