Get-AzureStorSimpleResource

作成したすべてのリソースを取得します。

Note

このドキュメントで参照されているコマンドレットは、Azure Service Manager (ASM) API を使用する従来の Azure リソースを管理するためのものです。 ASM の提供終了が予定されているため、新しいリソースを作成する場合、このレガシ PowerShell モジュールは推奨されません。 詳細については、Azure Service Manager の提供終了に関するページを参照してください

Az PowerShell モジュールは、PowerShell を使用して Azure Resource Manager (ARM) リソースを管理するために推奨される PowerShell モジュールです。

構文

Get-AzureStorSimpleResource
   [-ResourceName <String>]
   [-Profile <AzureSMProfile>]
   [<CommonParameters>]

説明

Get-AzureStorSimpleResource コマンドレットは、Azure Portal を使用して作成したすべてのリソースを取得します。 このコマンドレットは、リソースへの接続に使用できる詳細を取得します。

例 1: すべてのリソースを取得する

PS C:\>Get-AzureStorSimpleResource
VERBOSE: ClientRequestId: 5cd61b91-ef40-43b4-986d-156e06d2ed65_PS

ResourceName                                      ResourceId           ResourceState
------------                                      ----------           -------------
Contoso63-Tsqa                                    8838459798595306468  Started
Contoso68-Tsqa                                    2859070203638134681  Started
Contoso73-Tsqa                                    7871392677286863733  Started
Contoso87-Tsqa                                    1909806764156522689  Started
VERBOSE: Found 4 StorSimple resources.

このコマンドは、作成したすべてのリソースを取得します。 この例では、3 つのリソースがあります。

例 2: その名前を使用してリソースを取得する

PS C:\>Get-AzureStorSimpleResource -ResourceName "Contoso63-Tsqa"
VERBOSE: ClientRequestId: efc3c85c-12aa-4345-b6eb-ccc532de4825_PS

ResourceName                                      ResourceId           ResourceState
------------                                      ----------           -------------
Contoso63-Tsqa                                    1909806764156522689  Started
VERBOSE: Found 1 StorSimple resource.

このコマンドは、Contoso63-Tsqa という名前のリソースを取得します。

例 3: 存在しないリソースの取得を試みる

PS C:\>Get-AzureStorSimpleResource -ResourceName "Contoso64-Tsqa"
VERBOSE: ClientRequestId: 5d08d40b-f9d7-4d43-956f-13f01e89625b_PS
VERBOSE: Invalid input : Could not find a resource named Contoso64-Tsqa in your subscription.

このコマンドは、Contoso64-Tsqa という名前のリソースの取得を試みます。 この名前を持つリソースはありません。 この例では、リソースは返されません。

パラメーター

-Profile

Azure プロファイルを指定します。

型:AzureSMProfile
配置:Named
規定値:None
必須:False
パイプライン入力を受け取る:False
ワイルドカード文字を受け取る:False

-ResourceName

このコマンドレットが取得するリソースの名前を指定します。

型:String
Aliases:Name
配置:Named
規定値:None
必須:False
パイプライン入力を受け取る:False
ワイルドカード文字を受け取る:False

入力

None

出力

IEnumerable\<ResourceCredentials\>, ResourceCredentials

このコマンドレットは、次の プロパティを含む ResourceCredentials オブジェクトを返します。

  • ResourceName
  • ResouceId
  • ResourceState