Link to home
Start Free TrialLog in
Avatar of georgedschneider
georgedschneiderFlag for United States of America

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-Volume -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-Volume -FileSystem REFS -NewFileSystemLabel "Exchange Data" -SetIntegrityStreams $false
Avatar of Qlemo
Qlemo
Flag of Germany image

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.
Avatar of georgedschneider

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-Volume -FileSystem REFS -NewFileSystemLabel "Exchange Data" -SetIntegrityStreams $false
ASKER CERTIFIED SOLUTION
Avatar of Qlemo
Qlemo
Flag of Germany image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial