$pd = Get-NTNXProtectionDomain |其中{$_。活跃的情商真的美元}
#显示循环是如何设置的
foreach ($ p $ pd) {
$e = (Get-NTNXProtectionDomainCronSchedule -PDName $p.Name).userStartTimeInUsecs
#显示我的定制对象是如何构建的
$ dpcust = @ {
ProtectionDomain = $ p。的名字
VMName = $ p.vms。VMName加入”、“
NextSnapshot = $ scheduledtime
使用= $ convertUsage
时间= $ p.cronschedules.Type
LocalRetention = $ p.cronschedules.retentionpolicy。localmaxsnapshots加入”、“
}
}
使用Powershell检索最后一个快照时间戳的帮助
这是我使用Nutanix提供的Powershell cmdlets的第一个脚本。到目前为止,一切都很简单。但我有一个问题,我想有人可能马上就会知道。我在写报告。在这个报告中,它应该有保护域的下一个快照时间(很简单)。还包括上次创建快照的时间(还没有找到).有人愿意帮忙吗?我将展示我已经在脚本中构建的两种对象类型。基本上是PD和Cron计划。
代码:
代码:
Get-NTNXProtectionDomainSnapshot -PdName
回复
Learn more about our cookies.<\/a>","cookiepolicy.button":"Accept cookies","cookiepolicy.button.deny":"Deny all","cookiepolicy.link":"Cookie settings","cookiepolicy.modal.title":"Cookie settings","cookiepolicy.modal.content":"We use 3 different kinds of cookies. You can choose which cookies you want to accept. We need basic cookies to make this site work, therefore these are the minimum you can select. Learn more about our cookies.<\/a>","cookiepolicy.modal.level1":"Basic
Functional","cookiepolicy.modal.level2":"Normal
Functional + analytics","cookiepolicy.modal.level3":"Complete
Functional + analytics + social media + embedded videos"}}}">
Functional","cookiepolicy.modal.level2":"Normal
Functional + analytics","cookiepolicy.modal.level3":"Complete
Functional + analytics + social media + embedded videos"}}}">