Automation

 View Only
  • 1.  logical help for get snapshots

    Posted Jan 25, 2022 08:45 AM

    Hi,

    I have a problem on this small report. Somewhere must be something wrong, because the output is not true if id do some tests!

    The Report should only contains VMs´where snaphot is older than 24 hours or vm´s with snapshots older than 5 days(with exception tag).

    The exclusion to hold snaphots until 5 days is a certian tag.

    Based on this report the snapshots will be removed.

    For quick testing the time value is changed to minutes!

     



  • 2.  RE: logical help for get snapshots

    Posted Jan 25, 2022 09:09 AM

    Can you try with



  • 3.  RE: logical help for get snapshots

    Posted Jan 25, 2022 10:15 AM

    Hi,

     

    in your proposal  the secound filter after -or has no affect or?

    Is there a way to use the tag name instead the id?

     

     



  • 4.  RE: logical help for get snapshots
    Best Answer

    Posted Jan 25, 2022 10:41 AM

    Correct, you need to add the Tag test as well.

     


    Update: corrected typo in snippet

     



  • 5.  RE: logical help for get snapshots

    Posted Jan 25, 2022 11:11 AM

    thanks Luc,

    one id was to much..:-)  ((Get-TagAssignment -Entity $_.VM).Tag.Id.Name