我正在尝试通过Windows PowerShell在我的本地计算机上设置我的AWS,它给我以下错误消息;
PS C:\> Set-AWSCredentials -AccessKey {AAAAAAAAAAAAAAA} -SecretKey {AAAAAAAAAAAAA} -Stor
eAs {default}
Set-AWSCredentials : Cannot evaluate parameter 'AccessKey' because its argument is specified as a script block and
there is no input. A script block cannot be evaluated without input.
At line:1 char:31
+ Set-AWSCredentials -AccessKey {AAAAAAAAAAAAAAA} -SecretKey {AAAAAAAAAAAA ...
+ ~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : MetadataError: (:) [Set-AWSCredentials], ParameterBindingException
+ FullyQualifiedErrorId : ScriptBlockArgumentNoInput,Amazon.PowerShell.Common.SetCredentialsCmdlet
我的Powershell版本正在关注;
Major Minor Build Revision
----- ----- ----- --------
3 0 -1 -1
有谁知道问题是什么?
由于
答案 0 :(得分:7)
看起来您需要从代码中删除括号,因为某些原因,Google首先出现的亚马逊文档包含了这些文档,但是如果您查看http://docs.aws.amazon.com/powershell/latest/reference/items/Set-AWSCredentials.html以及靠近底部的示例,那么&#39 ; ll看到该函数确实在字符串中期望它们就像任何其他PowerShell cmdlet一样。
#container_page {
height:100vh !important;
}
#slide1 {
background: url('images/Frontpage.png');
background-size: cover !important;
width: 100%;
z-index: 15000;
text-align: center;
}
.overlay-background {
background: url('images/overlay-background.png') left top;
position: relative;
top: 0;
bottom: 0;
height: 100%;
z-index: 999 !important;
}
.menu {
position: relative;
top: 0px;
width: 100%;
height: 76px;
background: url('images/menu-background.png') left top;
z-index: 9999;
box-shadow: 0px 4px 15px rgba(0, 0, 0, 0.171);
-webkit-box-shadow: 0px 4px 15px rgba(0, 0, 0, 0.171);
-moz-box-shadow: 0px 4px 15px rgba(0, 0, 0, 0.171);
border-top: 3px solid rgb(139, 250, 2);
}
应该为你做的伎俩(如果有任何空格确保将字符串包装在引号中)