Powershell script for creating checkpoints on running machines, with user input

Josip 1 Reputation point
2022-05-20T14:49:22.263+00:00

Hello,
I need help with making a powershell script. The script has to offer a possibility of creating snapshots on all running Hyper-V virtual machines. It has to ask a user if he wants to create checkpoint for each of the running machines and if the answer is “yes” it stops that running machine, creates a checkpoint and then starts the machine.
Then this process should repeat for the next running machine.

Hyper-V
Hyper-V
A Windows technology providing a hypervisor-based virtualization solution enabling customers to consolidate workloads onto a single server.
2,555 questions
Windows Server PowerShell
Windows Server PowerShell
Windows Server: A family of Microsoft server operating systems that support enterprise-level management, data storage, applications, and communications.PowerShell: A family of Microsoft task automation and configuration management frameworks consisting of a command-line shell and associated scripting language.
5,387 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Ian Xue (Shanghai Wicresoft Co., Ltd.) 30,361 Reputation points Microsoft Vendor
    2022-05-30T09:11:35.097+00:00

    Hi,

    The Checkpoint-VM cmdlet creates a checkpoint of a virtual machine.

    https://learn.microsoft.com/en-us/powershell/module/hyper-v/checkpoint-vm

    Please note that the purpose of this forum is to get answers to script questions, not to ask someone to write or rewrite a script for you.

    Best Regards,
    Ian Xue

    -----------------------------

    If the Answer is helpful, please click "Accept Answer" and upvote it.
    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.

    0 comments No comments