File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed
src/ResourceManager/Compute/Commands.Compute/VirtualMachine/Config Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -47,7 +47,7 @@ public class AddAzureVMDataDiskCommand : Microsoft.Azure.Commands.ResourceManage
47
47
public string Name { get ; set ; }
48
48
49
49
[ Parameter (
50
- Mandatory = false ,
50
+ Mandatory = true ,
51
51
Position = 2 ,
52
52
ValueFromPipelineByPropertyName = true ,
53
53
HelpMessage = HelpMessages . VMDataDiskVhdUri ) ]
@@ -115,8 +115,8 @@ protected override void ProcessRecord()
115
115
Name = this . Name ,
116
116
Caching = this . Caching ,
117
117
DiskSizeGB = this . DiskSizeInGB ,
118
- Lun = this . Lun == null ? 0 : this . Lun . Value ,
119
- VirtualHardDisk = string . IsNullOrEmpty ( this . VhdUri ) ? null : new VirtualHardDisk
118
+ Lun = this . Lun . GetValueOrDefault ( ) ,
119
+ VirtualHardDisk = new VirtualHardDisk
120
120
{
121
121
Uri = this . VhdUri
122
122
} ,
You can’t perform that action at this time.
0 commit comments