I am doing the this tutorial https://technet.microsoft.com/library/mt771177.aspx
The thing is I made my virtual machine and asign to the lun a 0. The problem is I don t quite understand what does it mean to asign 0 to lun, and how does it affect that the following scrip to fail.
disk=Get-Disk | where {$_.PartitionStyle -eq "RAW"}
$diskNumber=$disk.Number
Initialize-Disk -Number $diskNumber
New-Partition -DiskNumber $diskNumber -UseMaximumSize -AssignDriveLetter
Format-Volume -DriveLetter F
disk=Get-Disk : The term 'disk=Get-Disk' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was included, verify that the path is correct and try again. At line:1 char:1 + disk=Get-Disk | where {$_.PartitionStyle -eq "RAW"} + ~~~~~~~~~~~~~ + CategoryInfo : ObjectNotFound: (disk=Get-Disk:String) [], CommandNotFoundException + FullyQualifiedErrorId : CommandNotFoundException
Initialize-Disk : Cannot validate argument on parameter 'Number'. The argument is null. Provide a valid value for the argument, and then try running the command again. At line:3 char:25 + Initialize-Disk -Number $diskNumber + ~~~~~~~~~~~ + CategoryInfo : InvalidData: (:) [Initialize-Disk], ParameterBindingValidationException + FullyQualifiedErrorId : ParameterArgumentValidationError,Initialize-Disk
New-Partition : Cannot validate argument on parameter 'DiskNumber'. The argument is null. Provide a valid value for the argument, and then try running the command again. At line:4 char:27 + New-Partition -DiskNumber $diskNumber -UseMaximumSize -AssignDriveLet ... + ~~~~~~~~~~~ + CategoryInfo : InvalidData: (:) [New-Partition], ParameterBindingValidationException + FullyQualifiedErrorId : ParameterArgumentValidationError,New-Partition
Format-Volume : No MSFT_Volume objects found with property 'DriveLetter' equal to 'F'. Verify the value of the property and retry. At line:5 char:1 + Format-Volume -DriveLetter F + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + CategoryInfo : ObjectNotFound: (F:Char) [Format-Volume], CimJobException + FullyQualifiedErrorId : CmdletizationQuery_NotFound_DriveLetter,Format-Volume