0
{
  "schemaVersion": "2.2",
  "description": "Map SMB Share using SMBGlobalMappings for Windows Containers",
  "mainSteps": [
    {
      "action": "aws:runPowerShellScript",
      "name": "runPowerShellWithSecureString",
      "precondition": {
        "StringEquals": [
          "platformType",
          "Windows"
        ]
      },
      "inputs": {
        "runCommand": [
          "$username = (Get-SSMParameterValue -Name plasmausername).Parameters[0].Value",
          "$password = (Get-SSMParameterValue -Name plasmapassword -WithDecryption $True).Parameters[0].Value | ConvertTo-SecureString -asPlainText -Force",
          "$credential = New-Object System.Management.Automation.PSCredential($username,$password)",
          "New-SmbGlobalMapping -RemotePath '\\\\amznfsxzijoxmju.plasma.com\\share\\' -Credential $credential -LocalPath D: -RequirePrivacy $true -ErrorAction Stop"
        ]
      }
    }
  ]
}

我想将 FSX 共享映射到 Windows 实例,我已加入域仍然收到此错误:

New-SmbGlobalMapping : The parameter is incorrect.
At line:1 char:1
+ New-SmbGlobalMapping -RemotePath "\\\\amznfsx5galhhax.file.onetechnow ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : InvalidArgument: (MSFT_SmbGlobalMapping:ROOT/Microsoft/...mbGlobalMapping) [New-SmbGlobalMapping], CimException
    + FullyQualifiedErrorId : Windows System Error 87,New-SmbGlobalMapping

用户名格式为:file.onetechnow.com/Admin

我在这里做错了什么?

4

1 回答 1

0

在关注此博客时遇到了同样的问题:

从以下行中删除单引号:

New-SmbGlobalMapping -RemotePath '\\\\FSxDNSNAME\\share\\Directory'
于 2021-07-26T21:11:06.940 回答