Jump to content
ARoode

Update script VMware snapshot

Recommended Posts

Does anyone have an update script for making and removing snapshots in VMware?

I would like to use it together with Windows update scripts to search and install updates.

Share this post


Link to post
Share on other sites

Hi there,

You could install PowerCLI on the machine and then use it from Pulseway to create snapshots. All you need to do is create a snapshot before running updates:

https://pubs.vmware.com/vsphere-51/index.jsp?topic=%2Fcom.vmware.powercli.cmdletref.doc%2FNew-Snapshot.html

I would keep the snapshot until you find updates again and at that point you delete the old snapshot and create a new one.

Get-VM | Get-Snapshot | Remove Snapshot

Make sure you add a filter to the first Get-VM call and maybe add a filter on the Get-Snapshot too by name.

-Paul

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


  • Similar Content

    • By NadeCatcher
      Hello,
      I've been trying to turn on my computer when I'm away from the house using both mobile data and another WiFi connection. When I'm on the same network the wake up command works but if I'm using mobile data I'll get the message "Wake up command failed" and when I'm on another network it says "wake up command sent" but nothing happens. I have the necessary port forwarded (UDP 9) and through the Pulseway android app port monitor I can see it works. Any help would be greatly appreciated.
      Thanks
    • By General_Snuss
      I changed phones recently and the new app says:
      'This device is pending approval. Login to the WebApp and approve it from the account devices page.'
      If I got to https://my.pulseway.com/main/account/devices there is no device to approve.
      Am I doing something wrong?
    • By Brandan
      Here is a Batch script to empty the SoftwareDistribution Folder.  It stops any installer processes in the background, temporarily disables the Windows Update Service, deletes everything in the Software Distribution folder then sets the Windows update service back to automatic and starts the service.
      @echo off
      CD C:\
      taskkill /F /im setup.exe
      taskkill /F /im ose00000.exe
      taskkill /F /im msiexec.exe
      sc config wuauserv start= disabled
      net stop wuauserv
      PowerShell.exe Remove-Item C:\Windows\SoftwareDistribution\* -Force -Recurse
      sc config wuauserv start= demand
      net start wuauserv
    • By Louwrens
      I know this would be a major change in the reporting interface, but how about an option to interact with the results of a report.
      Maybe one can choose  an additional "Report Format" when editing a report and have an option for Interactive?
      When this is enabled the output of the report is immediately displayed in web format with hyperlinks to automate certain tasks by sending a back-end task/script to the agent.
      For example:
      Report                                          Interaction Script Task (Relayed to the agent)
      Applications                               link next to each agent to uninstall the application
      Assets                                        link to create asset tag if none exist
      OS Patching                               link to assign Policy / Update now
      3rd Party Patching                    link next to each agent to update the application
      Drive Usage                               link to run a temp files cleanup job
      Anti-virus                                    install AV / Run Scan / Update (not sure how this ties in to the existing Kaspersky deployment)
       
      ...
       
       
       
×
×
  • Create New...