Forum Discussion
8 Replies
- mzukermanNovice IYes, it works. Thank you very much.
- mikenelson-pureCommunity ManagerDid you create the reference object for the snap? in the current version of the SDKv2, a reference object must be created for the snap (and it is not well documented). This step will be eliminated in the next release. ```$src = New-Pfa2ReferenceObject -Id $snap.Id -Name $snap.Name New-Pfa2Volume -Name volumecopy -Source $src```
- mzukermanNovice Iyes, I did create it.
- mzukermanNovice IAnd I can create the new volume from this reference object, but I need to overwrite the existing volume.
- barkzNovice I```$src = New-Pfa2ReferenceObject -Name overwrite_test.1 New-Pfa2Volume -Array $FA -Name overwrite_test -Source $src -Overwrite $true```
- barkzNovice ICurious did you get the following error with just using `-Overwrite` with no bool? ```New-Pfa2Volume : Missing an argument for parameter 'Overwrite'. Specify a parameter of type 'System.Nullable`1[System.Boolean]' and try again. At line:1 char:61 + ... ew-Pfa2Volume -Array $FA -Name overwrite_test -Source $src -Overwrite + ~~~~~~~~~~ + CategoryInfo : InvalidArgument: (:) [New-Pfa2Volume], ParameterBindingException + FullyQualifiedErrorId : MissingArgument,PureStorage.Rest.PowerShell.NewVolumeCmdlet```
- mzukermanNovice IYes, here it is: PS C:\WINDOWS\system32> New-Pfa2Volume -Array $FlashArray -Name NA01WSQLNODED11_Alarm_Data_clone -Source $src -Overwrite New-Pfa2Volume : Missing an argument for parameter 'Overwrite'. Specify a parameter of type 'System.Nullable`1[System.Boolean]' and try again. At line:1 char:87 + ... hArray -Name NA01WSQLNODED11_Alarm_Data_clone -Source $src -Overwrite + ~~~~~~~~~~ + CategoryInfo : InvalidArgument: (:) [New-Pfa2Volume], ParameterBindingException + FullyQualifiedErrorId : MissingArgument,PureStorage.Rest.PowerShell.NewVolumeCmdlet
- mikenelson-pureCommunity ManagerDoes it work for you if you add the `-Overwrite $true` ?