Create FSx for Windows file share with remote management cli

1

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!

AWS
yumings
질문됨 2년 전950회 조회
1개 답변
0

Hi yumings,

Thank you for using re:Post. The documentation does not make it directly obvious but the documented way is to create the directory by connecting with an FSxW Administrator Account to the D$ share of the system:

New-Item -Type Directory -Path \\amznfsxabcd0123.corp.example.com\D$\share\MyNewShare

From: https://docs.aws.amazon.com/fsx/latest/WindowsGuide/managing-file-shares.html

전문가
답변함 2년 전

로그인하지 않았습니다. 로그인해야 답변을 게시할 수 있습니다.

좋은 답변은 질문에 명확하게 답하고 건설적인 피드백을 제공하며 질문자의 전문적인 성장을 장려합니다.

질문 답변하기에 대한 가이드라인

관련 콘텐츠