I am trying to automate the update process of templates in our organization. This includes Virtual Hardware, VMware Tools and Windows Update.
The hardware and tools are straightforward but I have trouble with the last bit, Windows update.
I have made a PowerShell script that will run the windows update using the Windows Update PowerShell module downloaded from Script Windows Update PowerShell Module.
How can I use orchestrator to run this script on the template and how do I tackle the challenge of it not being in the domain? I have installed the PowerShell plugin and added a Powershell host.
I am pretty new at Orchestrator so any help or tips is greatly appreciated.
I think this is a common situation for any sysadmin willing to have all the VMware templates up to date, and I think each of us have a completely different way of doing it... so, lets focus now on your way:
- Is the powershell script/module already in the templates?
- Do you have all your tempaltes with the powershell module imported?
What tests have you done so far? I mean, have you invoked the command on a VM through the vCO powershell module? failures?
Apart from that, I did not get the question regarding AD... can you clarify what you are refering to?
Thanks for your reply.
To answere your questions:
- No I have not copied the script or module to the template. Can I just use workflows ""Copy file from vCO to guest" and "Create directory in guest"? How do I copy multiple files with "Copy file from vCO to guest"?
- I have not imported the module in the templates either. Should be able to run the import-module xxxxxxx at start of the ps script or isn't that possible? That is if I can complete the task above
I have tried to run it but got an error message saying: Client not found in Kerberos database (6) (Workflow:Invoke a PowerShell script / Invoke script (item0)#3)
Since then I have redesigned the workflow and it looks like this now:
The script that runs under the workflow "Run Script in VM guest" is this:
One problem I got now is copying all the files for the PS module into the Template VM. Couldn't find a workflow that will copy files to the guest, only 1 file.