PowerShell script exchange
Post Reply
jjvierra
Novice
Posts: 8
Liked: never
Joined: Jan 20, 2016 8:16 pm
Contact:

scripting question

Post by jjvierra »

I have some virtual security appliances that need to be shut down before they can be backed up.To shut them down you need to SSH to them, stop the application and then shutdown the appliance. An then restart them via vCenter. I'm looking for some ideas on a way to automate this process so i can schedule backups. Any help would be appreciated.

Thanks
veremin
Product Manager
Posts: 20270
Liked: 2252 times
Joined: Oct 26, 2012 3:28 pm
Full Name: Vladimir Eremin
Contact:

Re: scripting question

Post by veremin »

Is SSH connection really necessary? I'm wondering since from my perspective everything can be done via PowerCLI.

Code: Select all

Get-VM -name "Name of your VM" | Stop-VM

Code: Select all

Get-VM -name "Name of your VM" | Start-VM
Thanks.
jjvierra
Novice
Posts: 8
Liked: never
Joined: Jan 20, 2016 8:16 pm
Contact:

Re: scripting question

Post by jjvierra »

Just stopping the VM can cause corruption. I need to shutdown the application before I shutdown the VM.
foggy
Veeam Software
Posts: 21069
Liked: 2115 times
Joined: Jul 11, 2011 10:22 am
Full Name: Alexander Fogelson
Contact:

Re: scripting question

Post by foggy »

Also, do you really need to stop the VM at all, if you can gracefully stop the application? Have you considered using pre-freeze/post-thaw scripts to achieve that?
jjvierra
Novice
Posts: 8
Liked: never
Joined: Jan 20, 2016 8:16 pm
Contact:

Re: scripting question

Post by jjvierra »

Good point. Let me check and see. And I'll take a look at these scripts. Thanks for the help!
Post Reply

Who is online

Users browsing this forum: No registered users and 17 guests