I had a variable $gh with the below output. I mean when I type $gh. I will get values like below.
PS C:\Windows\system32>$gh
No. Department Name Environment Id Location Name Ready Status Machine Pure Status
1 EMA-MET-CAT5-KY04 Environment-k2345 EMA Enabled GREEN
2 EMA-MET-CAT5-KY03 Environment-k89 EMA Enabled GREEN
3 EMA-EFT-JIU-FC Environment-k3456 EMA Enabled GREEN
4 EMA-MET-CAT5-KY08 Environment-k7890 EMA Not Ready UNKNOWN
5 EMA-MET-CAT5-KY02-ED Environment-k9 EMA Enabled GREEN
The type of $gh is System.String as indicated by $gh.GetType().fullname.
I would like to get values from department name and environment id into a array or variable so that if i query about EMA-MET-CAT5-KY08 i can get environment id Environment-k7890.