VMware Cloud Community
WillianCardoso
Contributor
Contributor
Jump to solution

vCO + Powershell Host - little doubt

Good evening everyone,

I'm working in my company with automation. We're using the vCO to automate all the tasks.

Today, we can remotely running scripts and command line inside the linux virtual machine.

When a linux virtual machine is provisioned, remotely I can running a command to install puppet or run bash script, for example.

I'd like to run remote commands also on windows server.

From my research, it's possible using PowerShell. Right? Are there another way?

Only as example, I'd like to run command as:

- install puppet (msiexec /qn /i puppet.msi PUPPET_MASTER_SERVER=192.168.0.10 /l*v log_install.txt)

- run any bat script;

My doubts resume in:

- The PowerShell Host is the same Target Windows VM recently created? or It's another VM between the vCO and Target VM?

Cheers!

0 Kudos
1 Solution

Accepted Solutions
tschoergez
Leadership
Leadership
Jump to solution

Well, technically you can use the Powershell plugin, and dynamically configure each newly deployed VM as target host (temporarily).

However, if you just need to call a few commands, that seems to be a bit of an overkill.

Alternatives:

- Use the powershell plugin, to one static "midwife" powershell host, which then calls to the new VMs via psexec or remote powershell

- Use the SSH plugin (in case you can have a SSH server in the windows template)

- Use the guest operations (so you only need vmware tools installed on the Windows box). Check this package to "make it comfortable" : Guest script manager package

Cheers,

Joerg

View solution in original post

0 Kudos
2 Replies
tschoergez
Leadership
Leadership
Jump to solution

Well, technically you can use the Powershell plugin, and dynamically configure each newly deployed VM as target host (temporarily).

However, if you just need to call a few commands, that seems to be a bit of an overkill.

Alternatives:

- Use the powershell plugin, to one static "midwife" powershell host, which then calls to the new VMs via psexec or remote powershell

- Use the SSH plugin (in case you can have a SSH server in the windows template)

- Use the guest operations (so you only need vmware tools installed on the Windows box). Check this package to "make it comfortable" : Guest script manager package

Cheers,

Joerg

0 Kudos
WillianCardoso
Contributor
Contributor
Jump to solution

tschoergeztschoergez


Thank you for answer me.

I resolved my problem setting to each VM target one PowerShell Host.

I create (temporarily) a PowerShell Host, after I invoke the commands and after I destroyed the PowerShell Host.

I don't know if this is better way, but works.

I needed configure the service WinRM in template Windows.For that, I followed the link VMware vCenter Orchestrator Plug-In Documentation Center.


A guy, told me to research about a plugin called flowgrab. I still don't researched, but this plugin looks like I can to execute commands inside the virtual machine through of vmware-tools. Looks like interesting!

Link to research -> https://flowgrab.com

0 Kudos