无法通过azure automation runbook创建存储帐户

无法通过azure automation runbook创建存储帐户,azure,azure-powershell,azure-automation,Azure,Azure Powershell,Azure Automation,我正在尝试azure automation runbook,下面是我用来创建存储帐户的小脚本 Param ( [Parameter(Mandatory=$true)] [String] $AzureResourceGroup, [Parameter(Mandatory=$true)] [String] $StorageAC, [Parameter(Mandatory=$true)] [String] $Loc,

我正在尝试azure automation runbook,下面是我用来创建存储帐户的小脚本

Param
(   
    [Parameter(Mandatory=$true)]
    [String]
    $AzureResourceGroup,
    [Parameter(Mandatory=$true)]
    [String]
    $StorageAC,
    [Parameter(Mandatory=$true)]
    [String]
    $Loc,
    [Parameter(Mandatory=$true)]
    [String]
    $sku
)

$CredentialAssetName = "AutomationAccount";
$Cred = Get-AutomationPSCredential -Name $CredentialAssetName
if(!$Cred) {
    Throw "Could not find an Automation Credential Asset named 
'${CredentialAssetName}'. Make sure you have created one in this Automation 
 Account."
 }

Add-AzureRmAccount -Credential $Cred
Add-AzureAccount -Credential $Cred

$storeac = Get-AzureRmStorageAccount -ResourceGroupName $AzureResourceGroup
if ($storeac.StorageAccountName -eq "testdd" ){
 write-output " AC found !";

} else {
New-AzureRmStorageAccount -ResourceGroupName $AzureResourceGroup -Name 
$StorageAC -Location $Loc -SkuName $sku
}
但是,每当我在发布后运行它时,作业都会出现一个错误 (新AzureRmStorageAccount:找不到与参数名称'SkuName'匹配的参数)


有人能告诉我我做错了什么吗

New-AzureRmStorageAccount : A parameter cannot be found that matches parameter name 'SkuName'
请更新您的自动化帐户中的Azure模块,并单击自动化帐户=>模块下的“更新Azure模块”,然后重试runbook


是否有一行在
-Name
之后结束?您应该修复它的一个完整语句(新的AzureRmStorageAccount-ResourceGroupName$AzureResourceGroup-Name$StorageAC-Location$Loc-SkuName$sku),并且不保留括号或括号