How to get all keys from the bucket through powershell?

Hello,

This is the sample query which i am querying it through PowerShell. But here what i need is, I want to get all keys like “_measurement”. How i can get it. Can anyone help on this.

$body = @"
from(bucket:“Test”) |> range(start: -12mo) |> filter(fn: (r) => r._measurement == “Details”)
"@

Thanks.

@binosheen97 When you say:

all keys like “_measurement”

Do you mean all the column names/labels? Or are you looking for all the different measurements/tags/fields?