关于这个错误的快速问题由于大多数参考文献都是2-3年前的,我只想很好地了解我做错了什么。


发布于 2020-04-01 15:26:05
我假设您使用的是AmazonDynamoDBCmdlets,在这种情况下,您可以获得有关Connect-AmazonDynamoDB cmdlet参数的帮助,如下所示:
PS> import-module C:\amazondynamodbcmdlets.19.0.7354\AmazonDynamoDBCmdlets.psd1
PS> get-help connect-amazondynamodb
NAME
Connect-AmazonDynamoDB
SYNTAX
Connect-AmazonDynamoDB [-AccessKey <string>] [-AutoCache] [-AutoDetectIndex <bool>] [-BufferSize <string>] [-CacheConnection <string>] [-CacheLocation <string>] [-CacheMetadata] [-CacheProvider <string>] [-CacheTolerance <string>] [-CredentialsFileLocation <string>] [-Domain <string>] [-FirewallPassword <string>] [-FirewallPort <string>] [-FirewallServer <string>] [-FirewallType {NONE | TUNNEL | SOCKS4 | SOCKS5}] [-FirewallUser <string>] [-FlattenArrays <string>] [-FlattenObjects <bool>] [-GenerateSchemaFiles {Never | OnUse | OnStart}] [-InsertMode {REPLACE | DONTREPLACE}] [-Location <string>] [-Logfile <string>] [-MaximumRequestRetries <string>] [-MaxLogFileCount <string>] [-MaxLogFileSize <string>] [-MaxRows <string>] [-MFASerialNumber <string>] [-MFAToken <string>] [-NumberColumnMode {DOUBLE | DECIMAL | STRING}] [-Offline] [-Other <string>] [-Pagesize <string>] [-ProxyAuthScheme {BASIC | DIGEST | NONE | NEGOTIATE | NTLM | PROPRIETARY}] [-ProxyAutoDetect <bool>]
[-ProxyExceptions <string>] [-ProxyPassword <string>] [-ProxyPort <string>] [-ProxyServer <string>] [-ProxySSLType {AUTO | ALWAYS | NEVER | TUNNEL}] [-ProxyUser <string>] [-PseudoColumns <string>] [-Readonly] [-Region {NORTHERNVIRGINIA | OHIO | NORTHERNCALIFORNIA | OREGON | CENTRAL | IRELAND | FRANKFURT | LONDON | SINGAPORE | SYDNEY | SEOUL | TOKYO | MUMBAI | SAOPAULO | BEIJING | GOVCLOUDWEST | PARIS | NIGXIA | OSAKA-LOCAL}] [-RetryWaitTime <string>] [-RoleARN <string>] [-RowScanDepth <string>] [-RTK <string>] [-SecretKey <string>] [-SeparatorCharacter <string>] [-SSLServerCert <string>] [-SupportEnhancedSQL <bool>] [-Tables <string>] [-TemporaryTokenDuration <string>] [-ThreadCount <string>] [-Timeout <string>] [-TypeDetectionScheme {None | RowScan}] [-URL <string>] [-UseEC2Roles] [-UseSimpleNames] [-Verbosity <string>] [-Views <string>] [<CommonParameters>]
ALIASES
None
REMARKS
None如果你把它和你的命令做比较...
$amazondynamodb = Connect-AmazonDynamoDB -Access Key "$accessKey" -Secret Key -Domain "$secretKey" -Domain "$domainName" -Region "$regionName"...you可以看到你的参数名-Access Key和-Secret Key不应该有空格。
PowerShell将您的命令解释为一个名为-Access的参数,其值为Key,后面的另一个位置参数为您想要的参数值,-SecretKey参数也存在同样的问题。
删除空格,至少可以正确调用该命令。
https://stackoverflow.com/questions/60960129
复制相似问题