Remove-AzureDataDisk
Azure 가상 머신에서 데이터 디스크를 제거합니다.
참고
이 설명서에서 참조하는 cmdlet은 Service Management API를 사용하는 레거시 Azure 리소스를 관리하기 위한 것입니다. Azure Resource Manager 리소스를 관리하는 cmdlet은 Az PowerShell 모듈을 참조하세요.
Syntax
Remove-AzureDataDisk
[-LUN] <Int32>
[-DeleteVHD]
-VM <IPersistentVM>
[-Profile <AzureSMProfile>]
[-InformationAction <ActionPreference>]
[-InformationVariable <String>]
[<CommonParameters>]
Description
Remove-AzureDataDisk cmdlet은 Azure 가상 머신에서 데이터 디스크를 제거합니다. 기본적으로 이 cmdlet은 스토리지 계정에서 데이터 디스크 Blob을 제거하지 않습니다.
예제
예제 1: 데이터 디스크 제거
PS C:\> Get-AzureVM -ServiceName "ContosoService" -Name "VirtualMachine07" | Remove-AzureDataDisk -LUN 0
이 명령은 Get-AzureVM cmdlet을 사용하여 ContosoService라는 서비스에서 VirtualMachine07 이라는 가상 머신을 가져옵니다. 이 명령은 파이프라인 연산자를 사용하여 가상 머신을 현재 cmdlet에 전달합니다. 현재 cmdlet은 LUN 0이 있는 데이터 디스크를 제거합니다.
예제 2: 데이터 디스크 및 가상 하드 디스크 파일 제거
PS C:\> Get-AzureVM -ServiceName "ContosoService" -Name "VirtualMachine07" | Remove-AzureDataDisk -LUN 0 -DeleteVHD | Update-AzureVM
이 명령은 ContosoService라는 서비스에서 VirtualMachine07이라는 가상 머신을 가져옵니다. 이 명령은 가상 머신을 현재 cmdlet에 전달합니다. 현재 cmdlet은 LUN 0이 있는 데이터 디스크를 제거합니다. 이 명령에는 DeleteVHD 매개 변수가 포함됩니다. 따라서 기본 가상 하드 디스크도 삭제합니다. 이 명령은 Update-AzureVM cmdlet을 사용하여 변경 내용을 반영하도록 가상 머신을 업데이트합니다.
매개 변수
-DeleteVHD
이 cmdlet은 Blob Storage에서 데이터 디스크 및 VHD(가상 하드 디스크)를 제거한다는 것을 나타냅니다.
Type: | SwitchParameter |
Position: | 1 |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-InformationAction
이 cmdlet이 정보 이벤트에 응답하는 방법을 지정합니다.
이 매개 변수에 허용되는 값은 다음과 같습니다.
- 계속
- 무시
- 문의
- SilentlyContinue
- Stop
- 일시 중단
Type: | ActionPreference |
Aliases: | infa |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-InformationVariable
정보 변수를 지정합니다.
Type: | String |
Aliases: | iv |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-LUN
가상 머신의 데이터 드라이브에 대한 LUN(논리 단위 번호)을 지정합니다. 유효한 값은 0~15입니다.
Type: | Int32 |
Position: | 0 |
Default value: | None |
Required: | True |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-Profile
이 cmdlet이 읽는 Azure 프로필을 지정합니다. 프로필을 지정하지 않으면 이 cmdlet은 로컬 기본 프로필에서 읽습니다.
Type: | AzureSMProfile |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-VM
데이터 디스크에 연결된 가상 머신 개체를 지정합니다. 가상 머신 개체를 가져오려면 Get-AzureVM cmdlet을 사용합니다.
Type: | IPersistentVM |
Aliases: | InputObject |
Position: | Named |
Default value: | None |
Required: | True |
Accept pipeline input: | True |
Accept wildcard characters: | False |