{"id":3002,"date":"2024-02-11T08:57:35","date_gmt":"2024-02-11T08:57:35","guid":{"rendered":"https:\/\/www.it-react.com\/?p=3002"},"modified":"2025-01-13T13:01:04","modified_gmt":"2025-01-13T13:01:04","slug":"mastering-vmware-snapshots-with-powershell-powercli","status":"publish","type":"post","link":"https:\/\/www.it-react.com\/index.php\/2024\/02\/11\/mastering-vmware-snapshots-with-powershell-powercli\/","title":{"rendered":"Mastering VMware Snapshots with PowerShell\/PowerCLI"},"content":{"rendered":"\n<p>In the world of virtualization, managing resources efficiently is super important. If you&#8217;re an administrator dealing with virtual environments, using the right tools is a must. That&#8217;s where PowerShell comes in\u2014a really helpful tool that can make managing VMware snapshots easier, so things run smoothly and problems get solved fast.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>Simplifying Virtual Management with PowerShell<\/strong><\/h2>\n\n\n\n<p>Imagine a world where things happen quickly and accurately. That&#8217;s exactly what PowerShell does. With its strong scripting abilities and easy connection to VMware, it&#8217;s the tool you need to make managing your virtual environment easier, faster, and stronger.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>Why PowerShell Matters<\/strong><\/h2>\n\n\n\n<p>Think about effortlessly creating snapshots to protect important parts of your virtual machine operations. Picture setting up snapshot schedules easily across all your virtual machines, making sure your data is safe and your storage is used well. These are the reasons why PowerShell isn&#8217;t just an option\u2014it&#8217;s a must for managing virtual systems nowadays.<\/p>\n\n\n\n<p>In this blog post, we&#8217;re going to talk about how VMware snapshots and PowerShell work together. We&#8217;ll help you with the setup, creating scripts, and automation, showing you how this combo can change the way you manage virtual environments. Get ready for a future where managing things efficiently and confidently is all powered by PowerShell.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>Preparing the environment<\/strong><\/h2>\n\n\n\n<p>Let&#8217;s install the PowerCLI module in PowerShell first. Open the PowerShell as Administrator and enter:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>&gt;Install-Module -Name VMware.PowerCLI<\/code><\/pre>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"979\" height=\"348\" src=\"https:\/\/www.it-react.com\/wp-content\/uploads\/2023\/08\/grafik.png\" alt=\"\" class=\"wp-image-3005\" srcset=\"https:\/\/www.it-react.com\/wp-content\/uploads\/2023\/08\/grafik.png 979w, https:\/\/www.it-react.com\/wp-content\/uploads\/2023\/08\/grafik-300x107.png 300w, https:\/\/www.it-react.com\/wp-content\/uploads\/2023\/08\/grafik-768x273.png 768w\" sizes=\"auto, (max-width: 979px) 100vw, 979px\" \/><\/figure>\n\n\n\n<p>Before connecting to vCenter, check ExecutionPolicy. If Restricted set it on Unrestricted using command bellow:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>&gt;Get-ExecutionPolicy\nRestricted\n&gt;Set-ExecutionPolicy Unrestricted<\/code><\/pre>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"143\" src=\"https:\/\/www.it-react.com\/wp-content\/uploads\/2024\/01\/image-1024x143.png\" alt=\"\" class=\"wp-image-3053\" srcset=\"https:\/\/www.it-react.com\/wp-content\/uploads\/2024\/01\/image-1024x143.png 1024w, https:\/\/www.it-react.com\/wp-content\/uploads\/2024\/01\/image-300x42.png 300w, https:\/\/www.it-react.com\/wp-content\/uploads\/2024\/01\/image-768x107.png 768w, https:\/\/www.it-react.com\/wp-content\/uploads\/2024\/01\/image.png 1074w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p>After that, login to vCenter using command bellow and you will get the following message. <\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>&gt;Connect-VIServer -Server &lt;Server_FQDN_or_IP&gt; -user &lt;login_user&gt;<\/code><\/pre>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"244\" src=\"https:\/\/www.it-react.com\/wp-content\/uploads\/2023\/08\/2023-08-25-11-43-50-1024x244.jpg\" alt=\"\" class=\"wp-image-3008\" srcset=\"https:\/\/www.it-react.com\/wp-content\/uploads\/2023\/08\/2023-08-25-11-43-50-1024x244.jpg 1024w, https:\/\/www.it-react.com\/wp-content\/uploads\/2023\/08\/2023-08-25-11-43-50-300x72.jpg 300w, https:\/\/www.it-react.com\/wp-content\/uploads\/2023\/08\/2023-08-25-11-43-50-768x183.jpg 768w, https:\/\/www.it-react.com\/wp-content\/uploads\/2023\/08\/2023-08-25-11-43-50.jpg 1132w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p>As it says, if you want to participate to the Customer Experience Impovement Program (&#8220;CEIP&#8221;), issue the command with parameter $true at the end, if you don&#8217;t want use $false. I opted not to participate:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>&gt;Set-PowerCLIConfiguration -Scope User -ParticipateCEIP $false<\/code><\/pre>\n\n\n\n<p>If you are using a selfsigned certificate, you have to run the following command to be able to connect:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>&gt;Set-PowerCLIConfiguration -InvalidCertificateAction Ignore -Confirm:$false<\/code><\/pre>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"372\" src=\"https:\/\/www.it-react.com\/wp-content\/uploads\/2023\/08\/grafik-2-1024x372.png\" alt=\"\" class=\"wp-image-3012\" srcset=\"https:\/\/www.it-react.com\/wp-content\/uploads\/2023\/08\/grafik-2-1024x372.png 1024w, https:\/\/www.it-react.com\/wp-content\/uploads\/2023\/08\/grafik-2-300x109.png 300w, https:\/\/www.it-react.com\/wp-content\/uploads\/2023\/08\/grafik-2-768x279.png 768w, https:\/\/www.it-react.com\/wp-content\/uploads\/2023\/08\/grafik-2.png 1138w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p>Another option would be to install PowerCLI Program.  <\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>Authenticate to VMware vSphere<\/strong><\/h2>\n\n\n\n<p>After preparing the environment, the next step is to connect and authenticate to the VMware vSphere.<br>Let&#8217;s see the login function.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code># Function to login to vCenter\nfunction Login-VCenter {\n    $vcServer = Read-Host \"Enter vCenter server\"\n    $credential = Get-Credential -Message \"Enter your vCenter credentials\"\n\n    try {\n        Connect-VIServer -Server $vcServer -Credential $credential -ErrorAction Stop\n        &#91;Console]::ForegroundColor = &#91;ConsoleColor]::Green\n        Write-Host (\"Successfully connected to vCenter server.\" + &#91;System.Environment]::NewLine)\n        &#91;Console]::ResetColor()\n        Write-Host \"\"\n    } catch {\n        Write-Host \"Cannot complete login due to an incorrect user name or password.\" -ForegroundColor Red\n        Write-Host \"Exiting script.\"\n        exit\n    }\n}\n\n\n# Automatically log in to vCenter\nLogin-VCenter\n<\/code><\/pre>\n\n\n\n<p>The function above will prompt for vCenter, User and Password. If successfully connected, it will display the message in green, if not in red.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"multiple\"><strong>UPDATE: Login to multiple vCenters<\/strong><\/h2>\n\n\n\n<p>Based on feedback from one of my readers, I have enhanced the function to allow connections to multiple vCenters. After entering the first vCenter, the function now prompts you to decide whether to connect to another vCenter. If you choose to do so, you&#8217;ll be asked whether to reuse the same credentials or provide new ones. This added flexibility ensures the function can accommodate environments with multiple vCenters, each potentially requiring unique credentials.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code># Function to login to multiple vCenters\nfunction Login-MultipleVCenters {\n    function Login-VCenter {\n        param (\n            &#91;string]$vcServer,\n            &#91;PSCredential]$credential\n        )\n\n        try {\n            Connect-VIServer -Server $vcServer -Credential $credential -ErrorAction Stop\n            &#91;Console]::ForegroundColor = &#91;ConsoleColor]::Green\n            Write-Host (\"Successfully connected to vCenter server: $vcServer.\" + &#91;System.Environment]::NewLine)\n            &#91;Console]::ResetColor()\n        } catch {\n            Write-Host \"Cannot complete login to $vcServer due to an incorrect user name or password or other issue.\" -ForegroundColor Red\n            throw\n        }\n    }\n\n    # Clear existing connections\n    $global:DefaultVIServer = @()\n\n    # Initial login\n    $vcServer = Read-Host \"Enter vCenter server\"\n    $credential = Get-Credential -Message \"Enter your vCenter credentials\"\n\n    try {\n        Login-VCenter -vcServer $vcServer -credential $credential\n    } catch {\n        Write-Host \"Exiting script.\" -ForegroundColor Red\n        exit\n    }\n\n    # Prompt for additional vCenters\n    while ($true) {\n        $response = Read-Host \"Would you like to connect to another vCenter? (Yes\/No)\"\n\n        if ($response -match \"(?i)^y(?:es)?$\") {\n            $additionalVCenter = Read-Host \"Enter the FQDN or IP address of the next vCenter\"\n            $useSameCredentials = Read-Host \"Would you like to use the same credentials for $additionalVCenter? (Yes\/No)\"\n\n            if ($useSameCredentials -match \"(?i)^y(?:es)?$\") {\n                try {\n                    Login-VCenter -vcServer $additionalVCenter -credential $credential\n                } catch {\n                    Write-Host \"Failed to connect to vCenter: $additionalVCenter. Skipping to next prompt.\" -ForegroundColor Yellow\n                }\n            } elseif ($useSameCredentials -match \"(?i)^no?$\") {\n                $newCredential = Get-Credential -Message \"Enter credentials for $additionalVCenter\"\n                try {\n                    Login-VCenter -vcServer $additionalVCenter -credential $newCredential\n                } catch {\n                    Write-Host \"Failed to connect to vCenter: $additionalVCenter. Skipping to next prompt.\" -ForegroundColor Yellow\n                }\n            } else {\n                Write-Host \"Invalid response. Please enter 'Yes' or 'No'.\" -ForegroundColor Red\n            }\n        } elseif ($response -match \"(?i)^no?$\") {\n            Write-Host \"No additional vCenters to connect. Proceeding to menu.\" -ForegroundColor Yellow\n            break\n        } else {\n            Write-Host \"Invalid response. Please enter 'Yes' or 'No'.\" -ForegroundColor Red\n        }\n    }\n\n    Write-Host \"Connection process complete.\" -ForegroundColor Green\n}\n\n# Automatically log in to multiple vCenters\nLogin-MultipleVCenters\n<\/code><\/pre>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>List Snapshots<\/strong><\/h2>\n\n\n\n<p>The first function that will deal with the snapshots is listing of the snapshots. The function will also add a number in front of each snapshot, identifying this way the total number of present snapshots. <\/p>\n\n\n\n<pre class=\"wp-block-code\"><code># Function to list snapshots \nfunction List-Snapshots {\n    $snapshots = Get-VM | Get-Snapshot\n\n    if ($snapshots.Count -eq 0) {\n        Write-Host \"No snapshots found.\"\n    } else {\n        Write-Host \"Snapshots:\"\n        for ($i = 0; $i -lt $snapshots.Count; $i++) {\n            Write-Host \"$($i + 1). VM: $($snapshots&#91;$i].VM.Name), Snapshot: $($snapshots&#91;$i].Name)\"\n        }\n    }\n}<\/code><\/pre>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>Create Snapshot<\/strong><\/h2>\n\n\n\n<p>The next necessary action would be to create a snapshot. We have to know first the name of the VM in order to create a Snapshot. It&#8217;s not our goal here to list all the VMs present in our virtual environment,  you can take the name of VM from vCenter or ESXi Host.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code># Function to create a snapshot \nfunction Create-Snapshot {\n    $vmName = Read-Host \"Enter the name of the VM\"\n    $vm = Get-VM -Name $vmName\n\n    if ($vm) {\n        $snapshotName = Read-Host \"Enter the name of the snapshot\"\n        $snapshotDescription = Read-Host \"Enter the description of the snapshot\"      \n        New-Snapshot -VM $vm -Name $snapshotName -Description $snapshotDescription\n        Write-Host \"Snapshot $($snapshotName) created for VM $($vm.Name).\"\n    } else {\n        Write-Host \"VM $($vmName) not found.\"\n    }\n}<\/code><\/pre>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>Restore Snapshot<\/strong><\/h2>\n\n\n\n<p>So until now we listed, we created&#8230; what about revert to one of the snapshots!?<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code># Function to restore a snapshot\nfunction Restore-Snapshot {\n    $snapshots = Get-VM | Get-Snapshot\n\n    if ($snapshots.Count -eq 0) {\n        Write-Host \"No snapshots found.\"\n        return\n    }\n\n    List-Snapshots\n\n    $snapshotNumber = Read-Host \"Enter the number of the snapshot to restore\"\n\n    if (&#91;int]$snapshotNumber -ge 1 -and &#91;int]$snapshotNumber -le $snapshots.Count) {\n        $snapshot = $snapshots&#91;$snapshotNumber - 1]\n        $confirmation = Read-Host \"Are you sure you want to restore snapshot $($snapshot.Name) for VM $($snapshot.VM.Name)? (Y\/N)\"\n        if ($confirmation -eq \"Y\" -or $confirmation -eq \"y\") {\n            Set-VM -VM $snapshot.VM -Snapshot $snapshot\n            Write-Host \"Restored snapshot $($snapshot.Name) for VM $($snapshot.VM.Name).\"\n        } else {\n            Write-Host \"Restoration cancelled.\"\n        }\n    } else {\n        Write-Host \"Invalid snapshot number.\"\n    }\n}\n<\/code><\/pre>\n\n\n\n<p>Here we&#8217;ll use at the beginning the List-Snapshots function to see all the snapshots. After that, we have to enter only the corresponding number and the snapshot will be restored, of course not before a supplementary confirmation. <\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>Delete Snapshot<\/strong><\/h2>\n\n\n\n<p>And the last available function will be to delete the snapshots. <\/p>\n\n\n\n<pre class=\"wp-block-code\"><code># Function to delete a snapshot  \nfunction Delete-Snapshot {\n    List-Snapshots\n    $snapshotNumber = Read-Host \"Enter the number of the snapshot to delete\"\n\n    if (&#91;int]::TryParse($snapshotNumber, &#91;ref]0)) {\n        $snapshotNumber = &#91;int]$snapshotNumber\n        $snapshots = Get-VM | Get-Snapshot\n\n        if ($snapshotNumber -ge 1 -and $snapshotNumber -le $snapshots.Count) {\n            $snapshotToDelete = $snapshots&#91;$snapshotNumber - 1]\n            Write-Host \"You've chosen to delete the snapshot $($snapshotToDelete.Name) for VM $($snapshotToDelete.VM.Name).\"\n\n            $confirmation = Read-Host \"Are you sure you want to delete this snapshot? (Y\/N)\"\n            if ($confirmation -eq \"Y\" -or $confirmation -eq \"y\") {\n                #$originalErrorActionPreference = $ErrorActionPreference\n                #$ErrorActionPreference = \"SilentlyContinue\"\n                Remove-Snapshot -Snapshot $snapshotToDelete -Confirm:$false\n                #$ErrorActionPreference = $originalErrorActionPreference\n                Write-Host \"Snapshot $($snapshotToDelete.Name) deleted.\"\n            } else {\n                Write-Host \"Snapshot deletion cancelled.\"\n            }\n        } else {\n            Write-Host \"Invalid snapshot number.\"\n        }\n    } else {\n        Write-Host \"Invalid input. Please enter a valid number.\"\n    }\n}<\/code><\/pre>\n\n\n\n<p>We&#8217;ll use again the List-Snapshots function, after that all we have to do is to select the number of the snapshot that we want to remove.<\/p>\n\n\n\n<p>These were the basic functions and their corresponding scripts, but we can add some more power to the main script by including functionalities that will be aplied on multiple VMs simultaneously. <\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>Export snapshots to a CSV file<\/strong><\/h2>\n\n\n\n<p>This script will get all the snapshots from vCenter and export them to a CSV file in the current location with the name <strong>export_DATE_TIME.csv.<\/strong> The file will include the VM&#8217;s name and snapshots&#8217; name.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code># Function to export snapshots to a file\nfunction Export-Snapshots {\n    $snapshots = Get-VM | Get-Snapshot\n\n    if ($snapshots.Count -eq 0) {\n        Write-Host \"No snapshots found to export.\"\n        return\n    }\n\n    $exportFileName = \"export_$(Get-Date -Format 'yyyyMMdd_HHmmss').csv\"\n    $snapshotsData = @()\n\n    foreach ($snapshot in $snapshots) {\n        $snapshotData = &#91;PSCustomObject]@{\n            VMName = $snapshot.VM.Name\n            SnapshotName = $snapshot.Name\n        }\n        $snapshotsData += $snapshotData\n    }\n\n    $snapshotsData | Export-Csv -Path $exportFileName -NoTypeInformation\n    Write-Host \"Snapshots exported to $($exportFileName).\"\n}<\/code><\/pre>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>Import snapshots from a CSV file and prompt for creation<\/strong><\/h2>\n\n\n\n<p>The script will get the Name of VMs and corresponding Snapshots&#8217; name and will create the snapshots on vCenter. Before creation, the user will see the list of snapshots and will be prompted for a confirmation.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code># Function to import snapshots from a CSV file and prompt for creation\nfunction Import-File-And-Create-Snapshots {\n    $importFile = Read-Host \"Enter the path to the import CSV file\"\n    \n    if (-not (Test-Path $importFile)) {\n        Write-Host \"Import file not found.\"\n        return\n    }\n\n    $snapshotsData = Import-Csv -Path $importFile\n\n    if ($snapshotsData.Count -eq 0) {\n        Write-Host \"No snapshots found in the import file.\"\n        return\n    }\n\n    Write-Host \"Snapshots to create from the import file:\"\n    foreach ($snapshotData in $snapshotsData) {\n        Write-Host \"VM: $($snapshotData.VMName), Snapshot: $($snapshotData.SnapshotName)\"\n    }\n\n    $confirmation = Read-Host \"Are you sure you want to create these snapshots? (Y\/N)\"\n\n    if ($confirmation -eq \"Y\" -or $confirmation -eq \"y\") {\n        foreach ($snapshotData in $snapshotsData) {\n            $vmName = $snapshotData.VMName\n            $vm = Get-VM -Name $vmName\n\n            if ($vm) {\n                $snapshotName = $snapshotData.SnapshotName\n                $snapshotDescription = \"Imported snapshot from file\"\n                New-Snapshot -VM $vm -Name $snapshotName -Description $snapshotDescription\n                Write-Host \"Snapshot $($snapshotName) created for VM $($vmName).\"\n            } else {\n                Write-Host \"VM $($vmName) not found.\"\n            }\n        }\n    } else {\n        Write-Host \"Creation cancelled.\"\n    }\n}<\/code><\/pre>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>Import snapshots from CSV file and prompt for deletion<\/strong><\/h2>\n\n\n\n<p>The script will get the Name of VMs and corresponding Snapshots&#8217; name and will delete these snapshots on vCenter. Before deleting them, the user will see the list of snapshots to be deleted and will be prompted for a confirmation.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code># Function to import snapshots from a CSV file and prompt for deletion\nfunction Import-File-And-Delete-Snapshots {\n    $importFile = Read-Host \"Enter the path to the import CSV file\"\n    \n    if (-not (Test-Path $importFile)) {\n        Write-Host \"Import file not found.\"\n        return\n    }\n\n    $snapshotsData = Import-Csv -Path $importFile\n\n    if ($snapshotsData.Count -eq 0) {\n        Write-Host \"No snapshots found in the import file.\"\n        return\n    }\n\n    Write-Host \"Snapshots to delete from the import file:\"\n    foreach ($snapshotData in $snapshotsData) {\n        Write-Host \"VM: $($snapshotData.VMName), Snapshot: $($snapshotData.SnapshotName)\"\n    }\n\n    $confirmation = Read-Host \"Are you sure you want to delete these snapshots? (Y\/N)\"\n\n    if ($confirmation -eq \"Y\" -or $confirmation -eq \"y\") {\n        foreach ($snapshotData in $snapshotsData) {\n            $vmName = $snapshotData.VMName\n            $snapshotName = $snapshotData.SnapshotName\n            $vm = Get-VM -Name $vmName\n\n            if ($vm) {\n                $snapshot = Get-Snapshot -VM $vm -Name $snapshotName\n                if ($snapshot) {\n                    Remove-Snapshot -Snapshot $snapshot -Confirm:$false\n                    Write-Host \"Snapshot $($snapshotName) deleted for VM $($vmName).\"\n                } else {\n                    Write-Host \"Snapshot $($snapshotName) not found for VM $($vmName).\"\n                }\n            } else {\n                Write-Host \"VM $($vmName) not found.\"\n            }\n        }\n    } else {\n        Write-Host \"Deletion cancelled.\"\n    }\n}<\/code><\/pre>\n\n\n\n<p>We can test each function independently, but it will make more sense to integrate all of them into a script.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>Main Menu from where will run all the functions<\/strong><\/h2>\n\n\n\n<p>From here will access all the existing functions by pressing the corresponding letter. (L) for listing snapshots, (C) for creating them and so on.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code># Main loop\n$continueLoop = $true\nwhile ($continueLoop) {\n    Write-Host \"Choose an action:\"\n    Write-Host \" (L)ist snapshots\"\n    Write-Host \" (C)reate snapshot\"\n    Write-Host \" (R)estore snapshot\"\n    Write-Host \" (D)elete snapshot\"\n    Write-Host \" (E)xport snapshots to file\"\n    Write-Host \" (I)mport file and create snapshots\"\n    Write-Host \" i(M)port file and delete snapshots\"\n    Write-Host \" (Q)uit\"\n\n    $action = Read-Host -Prompt \"Enter your choice\"\n\n    switch ($action.ToUpper()) {\n        \"C\" {\n            Create-Snapshot\n        }\n        \"L\" {\n            List-Snapshots-Numbered\n        }\n        \"R\" {\n            Restore-Snapshot-By-Number\n        }\n        \"D\" {\n            Delete-Snapshot-By-Number\n        }\n        \"E\" {\n            Export-Snapshots\n        }\n        \"I\" {\n            Import-File-And-Create-Snapshots\n        }\n        \"M\" {\n            Import-File-And-Delete-Snapshots\n        }\n        \"Q\" {\n            Write-Host \"Exiting script.\"\n            Disconnect-VIServer -Server $global:DefaultVIServer -Confirm:$false\n            $continueLoop = $false\n            break\n        }\n        default {\n            Write-Host \"Invalid choice.\"\n        }\n    }\n}<\/code><\/pre>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"download\"><strong>Final script including all functions<\/strong><\/h2>\n\n\n\n<p>Here I added the final script. Just copy it and make fun with it.<\/p>\n\n\n\n<p><a class=\"effect1\" href=\"https:\/\/github.com\/ioanpenu\/VMware-Snapshot\/blob\/main\/manage_snapshots.ps1\">Download from github<\/a><br><br><strong>UPDATE<\/strong>: Download the script that connects to multiple vCenters from <a class=\"effect1\" href=\"https:\/\/github.com\/ioanpenu\/PowerShell-VMware-Scripts\/blob\/main\/manage_snapshots_multiple_vCenters.ps1\">here<\/a>.<\/p>\n\n\n\n<p><\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>Conclusion<\/strong><\/h2>\n\n\n\n<p>In summary, building a PowerShell script to manage VMware snapshots was a cool and challenging project. Working through the ins and outs of virtual environments was a fun and rewarding experience, highlighting the dynamic nature of this solution. Despite the complexities, every coding hurdle became an opportunity for skill enhancement, making this scripting journey both enjoyable and insightful.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>In the world of virtualization, managing resources efficiently is super important. If you&#8217;re an administrator dealing with virtual environments, using the right tools is a must. That&#8217;s where PowerShell comes in\u2014a really helpful tool that can make managing VMware snapshots easier, so things run smoothly and problems get solved fast. Simplifying Virtual Management with PowerShell [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":3071,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_monsterinsights_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0,"site-sidebar-layout":"default","site-content-layout":"","ast-site-content-layout":"default","site-content-style":"default","site-sidebar-style":"default","ast-global-header-display":"","ast-banner-title-visibility":"","ast-main-header-display":"","ast-hfb-above-header-display":"","ast-hfb-below-header-display":"","ast-hfb-mobile-header-display":"","site-post-title":"","ast-breadcrumbs-content":"","ast-featured-img":"","footer-sml-layout":"","ast-disable-related-posts":"","theme-transparent-header-meta":"","adv-header-id-meta":"","stick-header-meta":"","header-above-stick-meta":"","header-main-stick-meta":"","header-below-stick-meta":"","astra-migrate-meta-layouts":"default","ast-page-background-enabled":"default","ast-page-background-meta":{"desktop":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"tablet":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"mobile":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""}},"ast-content-background-meta":{"desktop":{"background-color":"var(--ast-global-color-4)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"tablet":{"background-color":"var(--ast-global-color-4)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"mobile":{"background-color":"var(--ast-global-color-4)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""}},"_FSMCFIC_featured_image_caption":"Foto von Joshua Sortino auf Unsplash","_FSMCFIC_featured_image_nocaption":"","_FSMCFIC_featured_image_hide":"","footnotes":""},"categories":[15],"tags":[37,25,26,36,41],"class_list":["post-3002","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-vmware","tag-esxi","tag-vcenter","tag-vmware","tag-vsphere","tag-vsphere_powercli"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.5 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Mastering VMware Snapshots with PowerShell\/PowerCLI - IT-REACT<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.it-react.com\/index.php\/2024\/02\/11\/mastering-vmware-snapshots-with-powershell-powercli\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Mastering VMware Snapshots with PowerShell\/PowerCLI - IT-REACT\" \/>\n<meta property=\"og:description\" content=\"In the world of virtualization, managing resources efficiently is super important. If you&#8217;re an administrator dealing with virtual environments, using the right tools is a must. That&#8217;s where PowerShell comes in\u2014a really helpful tool that can make managing VMware snapshots easier, so things run smoothly and problems get solved fast. Simplifying Virtual Management with PowerShell [&hellip;]\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.it-react.com\/index.php\/2024\/02\/11\/mastering-vmware-snapshots-with-powershell-powercli\/\" \/>\n<meta property=\"og:site_name\" content=\"IT-REACT\" \/>\n<meta property=\"article:published_time\" content=\"2024-02-11T08:57:35+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2025-01-13T13:01:04+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.it-react.com\/wp-content\/uploads\/2024\/02\/joshua-sortino-LqKhnDzSF-8-unsplash-e1707644576601.jpg\" \/>\n\t<meta property=\"og:image:width\" content=\"1079\" \/>\n\t<meta property=\"og:image:height\" content=\"600\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<meta name=\"author\" content=\"Ioan Penu\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Ioan Penu\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"6 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/www.it-react.com\\\/index.php\\\/2024\\\/02\\\/11\\\/mastering-vmware-snapshots-with-powershell-powercli\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.it-react.com\\\/index.php\\\/2024\\\/02\\\/11\\\/mastering-vmware-snapshots-with-powershell-powercli\\\/\"},\"author\":{\"name\":\"Ioan Penu\",\"@id\":\"https:\\\/\\\/www.it-react.com\\\/#\\\/schema\\\/person\\\/bf08cffeb4b02ee6baff5d56ab17c8f0\"},\"headline\":\"Mastering VMware Snapshots with PowerShell\\\/PowerCLI\",\"datePublished\":\"2024-02-11T08:57:35+00:00\",\"dateModified\":\"2025-01-13T13:01:04+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/www.it-react.com\\\/index.php\\\/2024\\\/02\\\/11\\\/mastering-vmware-snapshots-with-powershell-powercli\\\/\"},\"wordCount\":950,\"commentCount\":2,\"publisher\":{\"@id\":\"https:\\\/\\\/www.it-react.com\\\/#\\\/schema\\\/person\\\/bf08cffeb4b02ee6baff5d56ab17c8f0\"},\"image\":{\"@id\":\"https:\\\/\\\/www.it-react.com\\\/index.php\\\/2024\\\/02\\\/11\\\/mastering-vmware-snapshots-with-powershell-powercli\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.it-react.com\\\/wp-content\\\/uploads\\\/2024\\\/02\\\/joshua-sortino-LqKhnDzSF-8-unsplash-e1707644576601.jpg\",\"keywords\":[\"ESXi\",\"vCenter\",\"VMWare\",\"vSphere\",\"vSphere_PowerCLI\"],\"articleSection\":[\"VMWare\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/www.it-react.com\\\/index.php\\\/2024\\\/02\\\/11\\\/mastering-vmware-snapshots-with-powershell-powercli\\\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/www.it-react.com\\\/index.php\\\/2024\\\/02\\\/11\\\/mastering-vmware-snapshots-with-powershell-powercli\\\/\",\"url\":\"https:\\\/\\\/www.it-react.com\\\/index.php\\\/2024\\\/02\\\/11\\\/mastering-vmware-snapshots-with-powershell-powercli\\\/\",\"name\":\"Mastering VMware Snapshots with PowerShell\\\/PowerCLI - IT-REACT\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.it-react.com\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/www.it-react.com\\\/index.php\\\/2024\\\/02\\\/11\\\/mastering-vmware-snapshots-with-powershell-powercli\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/www.it-react.com\\\/index.php\\\/2024\\\/02\\\/11\\\/mastering-vmware-snapshots-with-powershell-powercli\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.it-react.com\\\/wp-content\\\/uploads\\\/2024\\\/02\\\/joshua-sortino-LqKhnDzSF-8-unsplash-e1707644576601.jpg\",\"datePublished\":\"2024-02-11T08:57:35+00:00\",\"dateModified\":\"2025-01-13T13:01:04+00:00\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/www.it-react.com\\\/index.php\\\/2024\\\/02\\\/11\\\/mastering-vmware-snapshots-with-powershell-powercli\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/www.it-react.com\\\/index.php\\\/2024\\\/02\\\/11\\\/mastering-vmware-snapshots-with-powershell-powercli\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/www.it-react.com\\\/index.php\\\/2024\\\/02\\\/11\\\/mastering-vmware-snapshots-with-powershell-powercli\\\/#primaryimage\",\"url\":\"https:\\\/\\\/www.it-react.com\\\/wp-content\\\/uploads\\\/2024\\\/02\\\/joshua-sortino-LqKhnDzSF-8-unsplash-e1707644576601.jpg\",\"contentUrl\":\"https:\\\/\\\/www.it-react.com\\\/wp-content\\\/uploads\\\/2024\\\/02\\\/joshua-sortino-LqKhnDzSF-8-unsplash-e1707644576601.jpg\",\"width\":1079,\"height\":600,\"caption\":\"Foto von Joshua Sortino auf Unsplash\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/www.it-react.com\\\/index.php\\\/2024\\\/02\\\/11\\\/mastering-vmware-snapshots-with-powershell-powercli\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/www.it-react.com\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Mastering VMware Snapshots with PowerShell\\\/PowerCLI\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/www.it-react.com\\\/#website\",\"url\":\"https:\\\/\\\/www.it-react.com\\\/\",\"name\":\"it-react\",\"description\":\"Ctrl\u2022Alt\u2022Automate\",\"publisher\":{\"@id\":\"https:\\\/\\\/www.it-react.com\\\/#\\\/schema\\\/person\\\/bf08cffeb4b02ee6baff5d56ab17c8f0\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/www.it-react.com\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":[\"Person\",\"Organization\"],\"@id\":\"https:\\\/\\\/www.it-react.com\\\/#\\\/schema\\\/person\\\/bf08cffeb4b02ee6baff5d56ab17c8f0\",\"name\":\"Ioan Penu\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/2a2a1b6be0f322a113eea11669895227e284c6091424d65be6c3c706c2822975?s=96&d=mm&r=g\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/2a2a1b6be0f322a113eea11669895227e284c6091424d65be6c3c706c2822975?s=96&d=mm&r=g\",\"contentUrl\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/2a2a1b6be0f322a113eea11669895227e284c6091424d65be6c3c706c2822975?s=96&d=mm&r=g\",\"caption\":\"Ioan Penu\"},\"logo\":{\"@id\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/2a2a1b6be0f322a113eea11669895227e284c6091424d65be6c3c706c2822975?s=96&d=mm&r=g\"}}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Mastering VMware Snapshots with PowerShell\/PowerCLI - IT-REACT","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.it-react.com\/index.php\/2024\/02\/11\/mastering-vmware-snapshots-with-powershell-powercli\/","og_locale":"en_US","og_type":"article","og_title":"Mastering VMware Snapshots with PowerShell\/PowerCLI - IT-REACT","og_description":"In the world of virtualization, managing resources efficiently is super important. If you&#8217;re an administrator dealing with virtual environments, using the right tools is a must. That&#8217;s where PowerShell comes in\u2014a really helpful tool that can make managing VMware snapshots easier, so things run smoothly and problems get solved fast. Simplifying Virtual Management with PowerShell [&hellip;]","og_url":"https:\/\/www.it-react.com\/index.php\/2024\/02\/11\/mastering-vmware-snapshots-with-powershell-powercli\/","og_site_name":"IT-REACT","article_published_time":"2024-02-11T08:57:35+00:00","article_modified_time":"2025-01-13T13:01:04+00:00","og_image":[{"width":1079,"height":600,"url":"https:\/\/www.it-react.com\/wp-content\/uploads\/2024\/02\/joshua-sortino-LqKhnDzSF-8-unsplash-e1707644576601.jpg","type":"image\/jpeg"}],"author":"Ioan Penu","twitter_card":"summary_large_image","twitter_misc":{"Written by":"Ioan Penu","Est. reading time":"6 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.it-react.com\/index.php\/2024\/02\/11\/mastering-vmware-snapshots-with-powershell-powercli\/#article","isPartOf":{"@id":"https:\/\/www.it-react.com\/index.php\/2024\/02\/11\/mastering-vmware-snapshots-with-powershell-powercli\/"},"author":{"name":"Ioan Penu","@id":"https:\/\/www.it-react.com\/#\/schema\/person\/bf08cffeb4b02ee6baff5d56ab17c8f0"},"headline":"Mastering VMware Snapshots with PowerShell\/PowerCLI","datePublished":"2024-02-11T08:57:35+00:00","dateModified":"2025-01-13T13:01:04+00:00","mainEntityOfPage":{"@id":"https:\/\/www.it-react.com\/index.php\/2024\/02\/11\/mastering-vmware-snapshots-with-powershell-powercli\/"},"wordCount":950,"commentCount":2,"publisher":{"@id":"https:\/\/www.it-react.com\/#\/schema\/person\/bf08cffeb4b02ee6baff5d56ab17c8f0"},"image":{"@id":"https:\/\/www.it-react.com\/index.php\/2024\/02\/11\/mastering-vmware-snapshots-with-powershell-powercli\/#primaryimage"},"thumbnailUrl":"https:\/\/www.it-react.com\/wp-content\/uploads\/2024\/02\/joshua-sortino-LqKhnDzSF-8-unsplash-e1707644576601.jpg","keywords":["ESXi","vCenter","VMWare","vSphere","vSphere_PowerCLI"],"articleSection":["VMWare"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.it-react.com\/index.php\/2024\/02\/11\/mastering-vmware-snapshots-with-powershell-powercli\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.it-react.com\/index.php\/2024\/02\/11\/mastering-vmware-snapshots-with-powershell-powercli\/","url":"https:\/\/www.it-react.com\/index.php\/2024\/02\/11\/mastering-vmware-snapshots-with-powershell-powercli\/","name":"Mastering VMware Snapshots with PowerShell\/PowerCLI - IT-REACT","isPartOf":{"@id":"https:\/\/www.it-react.com\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.it-react.com\/index.php\/2024\/02\/11\/mastering-vmware-snapshots-with-powershell-powercli\/#primaryimage"},"image":{"@id":"https:\/\/www.it-react.com\/index.php\/2024\/02\/11\/mastering-vmware-snapshots-with-powershell-powercli\/#primaryimage"},"thumbnailUrl":"https:\/\/www.it-react.com\/wp-content\/uploads\/2024\/02\/joshua-sortino-LqKhnDzSF-8-unsplash-e1707644576601.jpg","datePublished":"2024-02-11T08:57:35+00:00","dateModified":"2025-01-13T13:01:04+00:00","breadcrumb":{"@id":"https:\/\/www.it-react.com\/index.php\/2024\/02\/11\/mastering-vmware-snapshots-with-powershell-powercli\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.it-react.com\/index.php\/2024\/02\/11\/mastering-vmware-snapshots-with-powershell-powercli\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.it-react.com\/index.php\/2024\/02\/11\/mastering-vmware-snapshots-with-powershell-powercli\/#primaryimage","url":"https:\/\/www.it-react.com\/wp-content\/uploads\/2024\/02\/joshua-sortino-LqKhnDzSF-8-unsplash-e1707644576601.jpg","contentUrl":"https:\/\/www.it-react.com\/wp-content\/uploads\/2024\/02\/joshua-sortino-LqKhnDzSF-8-unsplash-e1707644576601.jpg","width":1079,"height":600,"caption":"Foto von Joshua Sortino auf Unsplash"},{"@type":"BreadcrumbList","@id":"https:\/\/www.it-react.com\/index.php\/2024\/02\/11\/mastering-vmware-snapshots-with-powershell-powercli\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.it-react.com\/"},{"@type":"ListItem","position":2,"name":"Mastering VMware Snapshots with PowerShell\/PowerCLI"}]},{"@type":"WebSite","@id":"https:\/\/www.it-react.com\/#website","url":"https:\/\/www.it-react.com\/","name":"it-react","description":"Ctrl\u2022Alt\u2022Automate","publisher":{"@id":"https:\/\/www.it-react.com\/#\/schema\/person\/bf08cffeb4b02ee6baff5d56ab17c8f0"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.it-react.com\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":["Person","Organization"],"@id":"https:\/\/www.it-react.com\/#\/schema\/person\/bf08cffeb4b02ee6baff5d56ab17c8f0","name":"Ioan Penu","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/secure.gravatar.com\/avatar\/2a2a1b6be0f322a113eea11669895227e284c6091424d65be6c3c706c2822975?s=96&d=mm&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/2a2a1b6be0f322a113eea11669895227e284c6091424d65be6c3c706c2822975?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/2a2a1b6be0f322a113eea11669895227e284c6091424d65be6c3c706c2822975?s=96&d=mm&r=g","caption":"Ioan Penu"},"logo":{"@id":"https:\/\/secure.gravatar.com\/avatar\/2a2a1b6be0f322a113eea11669895227e284c6091424d65be6c3c706c2822975?s=96&d=mm&r=g"}}]}},"_links":{"self":[{"href":"https:\/\/www.it-react.com\/index.php\/wp-json\/wp\/v2\/posts\/3002","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.it-react.com\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.it-react.com\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.it-react.com\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.it-react.com\/index.php\/wp-json\/wp\/v2\/comments?post=3002"}],"version-history":[{"count":57,"href":"https:\/\/www.it-react.com\/index.php\/wp-json\/wp\/v2\/posts\/3002\/revisions"}],"predecessor-version":[{"id":3389,"href":"https:\/\/www.it-react.com\/index.php\/wp-json\/wp\/v2\/posts\/3002\/revisions\/3389"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.it-react.com\/index.php\/wp-json\/wp\/v2\/media\/3071"}],"wp:attachment":[{"href":"https:\/\/www.it-react.com\/index.php\/wp-json\/wp\/v2\/media?parent=3002"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.it-react.com\/index.php\/wp-json\/wp\/v2\/categories?post=3002"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.it-react.com\/index.php\/wp-json\/wp\/v2\/tags?post=3002"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}