Azure自动化错误:无法识别术语“Add-AzureAnalysisServicesAccount” [英] Azure Automation error: The term 'Add-AzureAnalysisServicesAccount' is not recognized
问题描述
我有Azure自动化Runbook,它试图刷新Analysis Services表格模型。我有1)创建服务主体2)导入的SQLServer模块3)创建凭证4)导入的PowerShell 5)已启动。
I have Azure Automation Runbook, which try to refresh Analysis Services Tabular model. I have 1) Created Service Principal 2) Imported SQLServer Module 3) Created Credential 4) Imported PowerShell 5) Started.
为什么可以提供帮助?
https://docs.microsoft.com/en-us/azure/analysis-services/analysis-services-refresh-azure-automation
Add-AzureAnalysisServicesAccount : The term 'Add-AzureAnalysisServicesAccount' is not recognized as the name of a
cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was included, verify
that the path is correct and try again.
At line:8 char:1
+ Add-AzureAnalysisServicesAccount -Credential $Credential -ServicePrin ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : ObjectNotFound: (Add-AzureAnalysisServicesAccount:String) [], CommandNotFoundException
+ FullyQualifiedErrorId : CommandNotFoundException
Invoke-ProcessASDatabase : Authentication failed: User ID and Password are required when user interface is not
available.
At line:11 char:1
+ Invoke-ProcessASDatabase -Server $Server -DatabaseName $DatabaseName ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : NotSpecified: (:) [Invoke-ProcessASDatabase], ArgumentException
+ FullyQualifiedErrorId : System.ArgumentException,Microsoft.AnalysisServices.PowerShell.Cmdlets.ProcessASDatabase
$ TenantId =" xxxxx1"
$ Credential = Get-AutomationPSCredential -Name'AnalysisServicesPrincipal'
$ Server =" asazure:// westeurope.asazure.windows.net/xxxxx2"
$
$ DatabaseName =" xxxxx3-Analysis-Services"
$ RolloutEnvironment =" westeurope.asazure.windows.net"
#使用Azure AD服务主体登录Azure Analysis Services
Add-AzureAnalysisServicesAccount -Credential $ Credential -ServicePrincipal -TenantId $ TenantId -RolloutEnvironment $ RolloutEnvironment
#在Azure Analysis Services数据库上执行完全流程
Invoke-ProcessASDatabase -Server $ Server -DatabaseName $ DatabaseName -RefreshType" Full"
$TenantId = "xxxxx1"
$Credential = Get-AutomationPSCredential -Name 'AnalysisServicesPrincipal'
$Server = "asazure://westeurope.asazure.windows.net/xxxxx2"
$DatabaseName = "xxxxx3-Analysis-Services"
$RolloutEnvironment = "westeurope.asazure.windows.net"
# Log in to Azure Analysis Services using the Azure AD Service Principal
Add-AzureAnalysisServicesAccount -Credential $Credential -ServicePrincipal -TenantId $TenantId -RolloutEnvironment $RolloutEnvironment
# Perform a Process Full on the Azure Analysis Services database
Invoke-ProcessASDatabase -Server $Server -DatabaseName $DatabaseName -RefreshType "Full"
Kenny_I
推荐答案
嗨Kenny_I,< br $>
感谢您的联系!
看起来您必须导入/安装Azure.AnalysisServices 模块。
您的问题似乎与
this Stack Overflow问题。有关更多信息,请参阅。
希望这有帮助!!干杯!!如果这仍然无法解决您的问题,请告诉我。
Hi Kenny_I,
Thanks for reaching out!
Looks like you would have to import / install the Azure.AnalysisServices module from the gallery.
Your issue seems to be similar to this Stack Overflow issue. Please refer it for more information.
Hope this helps!! Cheers!! Let me know if this still doesn't resolve your issue.
这篇关于Azure自动化错误:无法识别术语“Add-AzureAnalysisServicesAccount”的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!