Select-AzureStorSimpleResource
리소스를 현재 리소스로 설정합니다.
참고 항목
이 설명서에서 참조되는 cmdlet은 ASM(Azure Service Manager) API를 사용하는 레거시 Azure 리소스를 관리하기 위한 것입니다. 이 레거시 PowerShell 모듈은 ASM이 사용 중지될 예정이므로 새 리소스를 만들 때 권장되지 않습니다. 자세한 내용은 Azure Service Manager 사용 중지를 참조 하세요.
Az PowerShell 모듈은 PowerShell을 사용하여 ARM(Azure Resource Manager) 리소스를 관리하는 데 권장되는 PowerShell 모듈입니다.
구문
Select-AzureStorSimpleResource
-ResourceName <String>
[-RegistrationKey <String>]
[-Profile <AzureSMProfile>]
[<CommonParameters>]
Description
Select-AzureStorSimpleResource cmdlet은 리소스를 현재 리소스로 설정합니다. 리소스를 선택하면 해당 리소스 컨텍스트 내에 다른 cmdlet이 적용됩니다.
예제
예제 1: 처음으로 리소스 선택
PS C:\>Select-AzureStorSimpleResource -ResourceName "Contoso64-Tsqa" -RegistrationKey "<your registration key>"
ResourceId ResourceName
---------- ------------
1909806764156522689 Contoso64-Tsqa
이 명령은 Contoso64-Tsqa라는 리소스를 현재 컨텍스트로 선택합니다. 이 예제에서는 컴퓨터에서 이전에 이 컨텍스트를 초기화하지 않았으므로 RegistrationKey 매개 변수의 값을 지정해야 합니다.
예제 2: 리소스 선택 시도
This command gets the current context for this computer by using the **Get-AzureStorSimpleResourceContext** cmdlet. The current selected resource is Contoso64-Tsqa. This is consistent with the previous example.
PS C:\>Get-AzureStorSimpleResourceContext
ResourceId ResourceName
---------- ------------
1909806764156522689 Contoso64-Tsqa
This command attempts to reset the resource to be Contoso02-Resource. For this example, this resource has not been previously selected. The registration key is not saved or included in the command. The command cannot select the resource.
PS C:\>Select-AzureStorSimpleResource -ResourceName "Contoso02-Resource"
Select-AzureStorSimpleResource : Could not find the persisted secret. Please use Select-AzureStorSimpleResource and
provide the Registration key once again.
예제 3: 이전에 선택한 리소스 선택
PS C:\>Select-AzureStorSimpleResource -ResourceName "Contoso64-Tsqa"
ResourceId ResourceName
---------- ------------
1909806764156522689 Contoso64-Tsqa
이 명령은 Contoso64-Tsqa라는 리소스를 현재 컨텍스트로 선택합니다. 이 예제에서는 해당 컨텍스트가 이전에 선택되었으므로 RegistrationKey 매개 변수의 값을 지정할 필요가 없습니다.
매개 변수
-Profile
Azure 프로필을 지정합니다.
형식: | AzureSMProfile |
Position: | Named |
Default value: | None |
필수: | False |
파이프라인 입력 허용: | False |
와일드카드 문자 허용: | False |
-RegistrationKey
등록 키를 지정합니다. 리소스를 처음 선택할 때 키를 지정합니다. 이 cmdlet이 현재 리소스를 선택한 후 cmdlet은 필요에 따라 이 키를 사용합니다. 자세한 내용은 Microsoft 개발자 네트워크에서 서비스 등록 키 (https://msdn.microsoft.com/en-us/library/azure/dn772346.aspx) 가져오기를 참조하세요.
형식: | String |
Position: | Named |
Default value: | None |
필수: | False |
파이프라인 입력 허용: | True |
와일드카드 문자 허용: | False |
-ResourceName
현재 리소스로 선택할 리소스의 이름을 지정합니다.
형식: | String |
Position: | Named |
Default value: | None |
필수: | True |
파이프라인 입력 허용: | True |
와일드카드 문자 허용: | False |
입력
None
출력
StorSimpleResourceContext
이 cmdlet은 리소스 컨텍스트에 대한 세부 정보를 포함하는 StorSimpleResourceContext 개체를 반환합니다.