Question

Assistance using Powershell to retrieve last snapshot time stamp

  • 5 August 2019
  • 1 reply
  • 2101 views

This is my first script using the Nutanix provided Powershell cmdlets. Everything has been pretty straight forward so far. But i'm having one problem, i think someone will probably know off hand. I'm building a report. In this report it should have next snapshot time for protection domain (Easy enough). But also last snapshot created time (haven't found it yet). Anyone will ing to assist? I'll show the two object types i'm building already in the script. Basically PD's and Cron schedules.



code:
$pd = Get-NTNXProtectionDomain | where {$_.Active -eq $True}
#Showing basically how the loop is setup
foreach($p in $pd){
$e = (Get-NTNXProtectionDomainCronSchedule -PDName $p.Name).userStartTimeInUsecs
#showing how my custom object is built

$dpcust = @{
ProtectionDomain = $p.Name
VMName = $p.vms.VMName -join ","
NextSnapshot = $scheduledtime
Usage = $convertUsage
Schedule = $p.cronschedules.Type
LocalRetention = $p.cronschedules.retentionpolicy.localmaxsnapshots -join ","
}
}

1 reply

Userlevel 3
Badge +13
@JSmisek You can use

code:
Get-NTNXProtectionDomainSnapshot -PdName 

Reply