search
Categories
Sponsors
VirtualMetric Hyper-V Monitoring, Hyper-V Reporting
Archive
Blogroll

Badges
MCSE
Community

Cozumpark Bilisim Portali
Setting Expiry date to virtual machines on SCVMM 2012 SP1 via PowerShell
Posted in Virtual Machine Manager, Windows Powershell | No Comment | 3,237 views | 12/12/2013 15:07

I use Custom1 section in SCVMM to set expiry date for virtual machines.

1
2
3
4
5
6
7
$Date = (Get-Date).AddDays(180).ToString("U")
$cp1 = Get-SCCustomProperty -Name Custom1
$VMs = Get-VM
foreach ($VM in $VMs)
{
     $VM | Set-SCCustomPropertyValue -CustomProperty $cp1 -Value $Date
}​​

I use System Center Orchestrator to check expiry dates.



Leave a Reply