Hi,
I'm trying to create a new FSx for windows file share through remote management. However, running the following cmd
invoke-command -credential $cred -ComputerName fsx.example.aws -ConfigurationName FsxRemoteAdmin -scriptblock {New-FSxSmbShare -Credential $using:cred -Name "myshare" -Path "D:\myshare" -Description "FSx Windows file share" -FolderEnumerationMode AccessBased -Confirm:$false}
returns the following error:
You can only create shares on the D: drive; if specifying a folder, the folder must already exist on the D: drive.
At line:1 char:1
+ invoke-command -credential $cred -ComputerName fsx.example.aws ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : OperationStopped: (You can only cr...n the D: drive.:String) [], RuntimeException
+ FullyQualifiedErrorId : You can only create shares on the D: drive; if specifying a folder, the folder must already exist on the D: drive.
It seems that the first step should be create a folder on the remote file system. However, the commands provided by Get-Command
does not contain New-Item
to create this folder. What is the correct procedure to create a new file share with FSx remote management cli? Thanks!