I am using the New-HPESALogicalDrive to create the Logical Drive in DL360. As per the syntax for -DataDrive, I am using double dimension array for it. But it is not able to create the logical drive. Below is my code snippet. $SA_PhysicalDrives = (Get-HPESAPhysicalDrive -Connection $Connect_SA -ControllerLocation $SA_ControllerLocation).PhysicalDrive.Location
$DrivesToBeAttached = @($SA_PhysicalDrives[0..($NoOfPhysicalDrives-1)]) # I am doing this, since $NoOfPhysicalDrives is a user input.
New-HPESALogicalDrive -Connection $Connect_SA -LogicalDriveName $LogicalDriveName -ControllerLocation $SA_ControllerLocation -Raid $RAID -DataDrive @(,$DrivesToBeAttached) After running the command like this, when I do Get-HPESALogicalDrive, I get the output like below. Also after reboot of the server, the drive is deleted automatically. ControllerLocation : Slot 0
ControllerModel : HPE Smart Array P408i-a SR Gen10
LogicalDriveName : VMware Boot Volume
Raid : Raid1
DataDrive : {<Objs Version="1.1.0.1"
xmlns="http://schemas.microsoft.com/powershell/2004/04">
<S>1I:1:1</S>
</Objs>, <Objs Version="1.1.0.1"
xmlns="http://schemas.microsoft.com/powershell/2004/04">
<S>1I:1:2</S>
</Objs>}
SpareDrive : {} But, when I run it without having a variable, it gives a proper output. New-HPESALogicalDrive -Connection $Connect_SA -LogicalDriveName $LogicalDriveName -ControllerLocation $SA_ControllerLocation -Raid $RAID -DataDrive @(,@("1I:1:1","1I:1:2")) Output: ControllerLocation : Slot 0
ControllerModel : HPE Smart Array P408i-a SR Gen10
LogicalDriveName : VMware Boot Volume
Raid : Raid1
DataDrive : {1I:1:1, 1I:1:2}
SpareDrive : {}
... View more