< Back

Get-AzureStorSimpleResource

Wed Jan 30, 2019 5:41 pm

NAME Get-AzureStorSimpleResource



SYNOPSIS

Gets all resources that you created.





SYNTAX

Get-AzureStorSimpleResource [[-ResourceName] <System.String>] [-Profile <Microsoft.Azure.Common.Authentication.Models.AzureProfile>] [<CommonParameters>]





DESCRIPTION

The Get-AzureStorSimpleResource cmdlet gets all resources that you created by using Azure Portal. The cmdlet gets details you can use to connect to the

resources.





PARAMETERS

-Profile [<Microsoft.Azure.Common.Authentication.Models.AzureProfile>]

Specifies an Azure profile.



Required? false

Position? named

Default value none

Accept pipeline input? false

Accept wildcard characters? false



-ResourceName [<System.String>]

Specifies the name of the resource that this cmdlet gets.



Required? false

Position? 1

Default value none

Accept pipeline input? false

Accept wildcard characters? false



<CommonParameters>

This cmdlet supports the common parameters: Verbose, Debug,

ErrorAction, ErrorVariable, WarningAction, WarningVariable,

OutBuffer, PipelineVariable, and OutVariable. For more information, see

about_CommonParameters (https:/go.microsoft.com/fwlink/?LinkID=113216).



INPUTS

None









OUTPUTS

IEnumerable<ResourceCredentials>, ResourceCredentials



This cmdlet returns ResourceCredentials objects that contain the following properties:



-- ResourceName

-- ResouceId

-- ResourceState





NOTES





Keywords: azure, azuresm, servicemanagement, management, service, store, storsimple



Example 1: Get all resources



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.



This command gets all the resources you created. In this example, there are three resources.





Example 2: Get a resource by using its name



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.



This command gets the resource named Contoso63-Tsqa.





Example 3: Attempt to get a nonexistent resource



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.



This command attempts to get the resource named Contoso64-Tsqa. There is no resource that has this name. This example does not return any resource.







RELATED LINKS

Get-AzureStorSimpleResourceContext

Select-AzureStorSimpleResource