AWS Tools for Windows PowerShell
Command Reference

AWS services or capabilities described in AWS Documentation may vary by region/location. Click Getting Started with Amazon AWS to see specific differences applicable to the China (Beijing) Region.

Synopsis

Outputs the values corresponding to one or more EC2 instance metadata categories. The metadata can be addressed using one or more category enumeration values or by specifying one or more category paths. The list of known categories can also be enumerated to the pipeline. For metadata that yields a single value, a single string is output. For metadata that yields an array of string values, the array is enumerated to the pipeline.

Syntax

ByCategory (Default)

Get-EC2InstanceMetadata
-Category <MetadataCategory[]>

ByPath

Get-EC2InstanceMetadata
-Path <String[]>

ListCategories

Get-EC2InstanceMetadata
-ListCategory <SwitchParameter>

Description

Return values of available metadata categories for the current EC2 instance. For more information on EC2 instance metadata see http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-instance-metadata.html.

Parameters

-Category <MetadataCategory[]>
One or more categories of instance metadata to retrieve.
Required?True
Position?Named
Accept pipeline input?False
-ListCategory <SwitchParameter>
Enumerates the categories that can be used with the -Category parameter to the pipeline.
Required?True
Position?Named
Accept pipeline input?False
-Path <String[]>
One or more instance metadata category paths to retrieve.
Required?True
Position?Named
Accept pipeline input?False

Inputs

This cmdlet does not accept pipeline input.

Outputs

Supported Version

AWS Tools for PowerShell: 2.x.y.z