我正在编写一个必须每月清理我的测试环境的Azure Runbook 。
我需要删除一些 Azure 作业,但是当我尝试使用Get-AzureRmSchedulerJob命令检索作业时,我收到此错误:
Get-AzureRmSchedulerJob -ResourceGroupName MyResourceGroupName -JobCollectionName myJobCollectionName
Get-AzureRmSchedulerJob : The term 'Get-AzureRmSchedulerJob' 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:10 char:1
+ Get-AzureRmSchedulerJob -ResourceGroupName MyResourceGroupName
+ ~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : ObjectNotFound: (Get-AzureRmSchedulerJob:String) [], CommandNotFoundException
+ FullyQualifiedErrorId : CommandNotFoundException
如何在 Azure Runbook 中检索我的作业?使用 PowerShell 此命令有效。我需要循环所有作业,因为我无法删除所有作业。
谢谢