VMware Cloud Community
alfar
Contributor
Contributor
Jump to solution

Running a script just once inside VM OS after VM is recovered at failover site

Hi all,

Inside all my VMs I have a script c:\foo.bat.

I want to run this script just once after the VM comes up during a SRM initiated DR test or a DR event.

What is the most elegant way to achieve this? Looking for specifics...

Regards

alfar

0 Kudos
1 Solution

Accepted Solutions
mal_michael
Commander
Commander
Jump to solution

Then you can use VMware PowerCLI to do that.

This is cmdlet called Invoke-VMScript. It can be used to run exe, batch file or powershell script inside VM. It doesn't require network connectivity, since it uses VMtools to run the script.

View solution in original post

0 Kudos
3 Replies
mal_michael
Commander
Commander
Jump to solution

What versions of Windows do you have in your environment?

alfar
Contributor
Contributor
Jump to solution

Windows 2003 32-bit standard

0 Kudos
mal_michael
Commander
Commander
Jump to solution

Then you can use VMware PowerCLI to do that.

This is cmdlet called Invoke-VMScript. It can be used to run exe, batch file or powershell script inside VM. It doesn't require network connectivity, since it uses VMtools to run the script.

0 Kudos