Hi,
I have all AD computer objects in various groups. These groups match their monthly update schedule:
Week1-Day1
Week1-Day4
Week2-Day2
Week2-Day5
...and so on. These groups are used in Patch Management tool to control when they get updates pushed.
I would like to schedule the snapshots of these VMs 30 minutes prior to patches being pushed.
I can work with Get-VM, Checkpoint-VM and Get-ADGroupMember cmdlets individually, but I cannot quite work out the Pipeline. What I am trying to do is have lots of Scheduled Tasks setup (one for each AD group basically) which:
Gets all VMs from the AD group used in the Get-ADGroupMember
Connects to the Hyper-V Cluster using Get-VM with -ClusterObject
Checkpoints the VMs in the supplied AD group only
Get-VM -ClusterObject (Get-ClusterResource -Cluster <CLUSTERNAME> | Checkpoint-VM -SnapshotName "Monthly update cycle"
Get-ADGroupMember -Identity "<ADGROUPNAME>" | Select Name
Where do I put Get-ADGroupMember in the Get-VM pipeline so that only those VMs get snapshotted
Thanks