< Back

Get-AzureStorSimpleResourceContext

Wed Jan 30, 2019 5:46 pm

NAME Get-AzureStorSimpleResourceContext



SYNOPSIS

Gets the current resource context.





SYNTAX

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





DESCRIPTION

The Get-AzureStorSimpleResourceContext cmdlet gets the current resource context.





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



<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

StorSimpleResourceContext



This cmdlet returns a ResourceContext object.





NOTES





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



Example 1: Get the current context



PS C:\\>Select-AzureStorSimpleResource -ResourceName "Contoso63-Tsqa"

PS C:\\> Get-AzureStorSimpleResourceContext

ResourceId ResourceName

---------- ------------

1909806764156522689 Contoso63-Tsqa



The first command sets the current context to be the resource named Contoso63-Tsqa by using the Select-AzureStorSimpleResource cmdlet.



The second command gets the current resource context.





Example 2: Attempt to get the current context



PS C:\\>Get-AzureStorSimpleResourceContext

Get-AzureStorSimpleResourceContext : Resource Context is not set for your subscription. Please use

Select-AzureStorSimpleResource -ResourceName <<name>> to set



This command gets the current context. In this example, no context has been set. The command returns a message that explains the problem.







RELATED LINKS

Get-AzureStorSimpleResource

Select-AzureStorSimpleResource