I have Windows EC2 and trying to fetch metadata
Invoke-RestMethod -uri http://169.254.169.254/latest/meta-data/
Invoke-RestMethod : Unable to connect to the remote server
At line:1 char:1
+ Invoke-RestMethod -uri http://169.254.169.254/latest/meta-data/
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : InvalidOperation: (System.Net.HttpWebRequest:HttpWebRequest) [Invoke-RestMethod], WebExc
eption
+ FullyQualifiedErrorId : WebCmdletWebResponseException,Microsoft.PowerShell.Commands.InvokeRestMethodCommand
How can I see the the metadata of EC2 instance?