Filtering by StartTime with the AWS PowerShell Cmdlets

I was recently trying to figure out how to return an AWS Storage Gateway snapshot by providing a value for the StartTime property and it wasn’t easy to say the least so I thought I would share my experience to save others the headache of figuring it out.

Most of the tutorials you’ll find online show filtering something similar to this:


You could also use multiple hash tables as shown in the following example:


Viewing the help for the Filter parameter shows what the valid names are so that part was easy enough to figure out:


You would think that I could simply copy and paste the date that was returned from one of the first two examples and it would return that one snapshot. If it were only that easy:


As it turns out, the value for StartTime has to be in the format shown in this example:


Using that format for the StartTime value returned the one snapshot without issue:


That was easy enough to figure out, right? I’ll let you decide the answer to that for yourself.


Leave a Reply

%d bloggers like this: