georgedschneider
asked on
Creating REFS volumes with PowerShell
I'm trying to create an REFS formatted volume for my Exchange 2016 server. I'm using the following powershell command to attempt to do so and everytime I run this it fails with an error
get-disk 1| Initialize-Disk -PartitionStyle GPT -PassThru|New-Partition -AssignDriveLetter -UseMaximumSize|Format-Vol ume -DriveLetter D -FileSystem REFS -NewFileSystemLabel "Exchange Data" -SetIntegrityStreams $false
Format-Volume : The input object cannot be bound to any parameters for the command either because the command does no
take pipeline input or the input and its properties do not match any of the parameters that take pipeline input.
At line:1 char:89
+ get-disk 1| Initialize-Disk -PartitionStyle GPT -PassThru|New-Partition -UseMaxi ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~ ~~~~~~~~~~ ~~~~~~~~~~ ~~~~~~~~~~ ~~~~~~~~~~ ~~~~
+ CategoryInfo : InvalidArgument: (MSFT_Partition ...et = 135266304):PSObject) [Format-Volume], Paramete
BindingException
+ FullyQualifiedErrorId : InputObjectNotBound,Format -Volume
If I run the command without -assigndriveletter and -drive letter no issues. I'm trying to do everything in one command.
et-disk 1| Initialize-Disk -PartitionStyle GPT -PassThru|New-Partition -UseMaximumSize|Format-Vol ume -FileSystem REFS -NewFileSystemLabel "Exchange Data" -SetIntegrityStreams $false
get-disk 1| Initialize-Disk -PartitionStyle GPT -PassThru|New-Partition -AssignDriveLetter -UseMaximumSize|Format-Vol
Format-Volume : The input object cannot be bound to any parameters for the command either because the command does no
take pipeline input or the input and its properties do not match any of the parameters that take pipeline input.
At line:1 char:89
+ get-disk 1| Initialize-Disk -PartitionStyle GPT -PassThru|New-Partition -UseMaxi ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : InvalidArgument: (MSFT_Partition ...et = 135266304):PSObject) [Format-Volume], Paramete
BindingException
+ FullyQualifiedErrorId : InputObjectNotBound,Format
If I run the command without -assigndriveletter and -drive letter no issues. I'm trying to do everything in one command.
et-disk 1| Initialize-Disk -PartitionStyle GPT -PassThru|New-Partition -UseMaximumSize|Format-Vol
Logic dictates that the combination of New-Partition -AssignDriveLetter and Format-Volume -DriveLetter D does not make sense. It should work if you just remove the -DriveLetter D from Format-Volume - you do not need to specify the partition by using the drive letter, you already provided the partition object via pipeline.
ASKER
How would I tell the command what drive letter to assign if I ran the below:
get-disk 1| Initialize-Disk -PartitionStyle GPT -PassThru|New-Partition -AssignDriveLetter -UseMaximumSize|Format-Vol ume -FileSystem REFS -NewFileSystemLabel "Exchange Data" -SetIntegrityStreams $false
get-disk 1| Initialize-Disk -PartitionStyle GPT -PassThru|New-Partition -AssignDriveLetter -UseMaximumSize|Format-Vol
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.