我最近创建了一个Runbook时间表,该时间表定期执行 - 周一每1周没有到期日。 时间表的创建是完美无缺的。 但是,当我想使用powershell cmdlet
检索所有Runbook日程表的列表时Get-AzureRmAutomationSchedule -Name name_of_the_failing_schedule
当我删除此特定计划时,将显示可用计划的完整列表。
我还有时间表而不是每小时/每天运行,他们不会产生这样的问题。
非常感谢任何帮助。
按照@ 4c74356b41的建议运行命令{
"id": "/subscriptions/XXXXXXXXX",
"name": "orphaned objects",
"properties": {
"description": "",
"startTime": "2016-11-28T09:00:00+01:00",
"startTimeOffsetMinutes": 0.0,
"expiryTime": "9999-12-31T23:59:59.9999999+01:00",
"expiryTimeOffsetMinutes": 0.0,
"isEnabled": true,
"nextRun": "2016-11-28T09:00:00+01:00",
"nextRunOffsetMinutes": 0.0,
"interval": 1,
"frequency": "Week",
"creationTime": "2016-11-22T10:41:49.433+01:00",
"lastModifiedTime": "2016-11-22T10:41:49.433+01:00",
"timeZone": "UTC",
"advancedSchedule": {
"monthDays": null,
"monthlyOccurrences": null,
"weekDays": [
"Monday"
]
}
}
后,我收到相同的错误消息。
在调试模式下运行cmdlet后,您可以看到http响应的主体
libA
答案 0 :(得分:0)
我在旧版本的AzureRM.Automation PowerShell模块上遇到了同样的错误:
PS C:\Users\Joe> Get-AzureRmAutomationSchedule -Name Every1WeekOnMonday -AutomationAccountName DemoAccount -ResourceGroupName DemoGroup
Get-AzureRmAutomationSchedule : Requested value 'Week' was not found.
At line:1 char:1
+ Get-AzureRmAutomationSchedule -Name Every1WeekOnMonday -AutomationAcc ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : CloseError: (:) [Get-AzureRmAutomationSchedule], ArgumentException
+ FullyQualifiedErrorId : Microsoft.Azure.Commands.Automation.Cmdlet.GetAzureAutomationSchedule
PS C:\Users\Joe> Get-Module -Name AzureRM.Automation
ModuleType Version Name ExportedCommands
---------- ------- ---- ----------------
Manifest 1.0.4 AzureRM.Automation {Export-AzureRmAutomationDscConfiguration, Export-AzureRmAutomationD...
升级到最新版本的AzureRM PowerShell cmdlet可修复此问题:
PS C:\Users\Joe> Get-AzureRmAutomationSchedule -Name Every1WeekOnMonday -AutomationAccountName DemoAccount -ResourceGroupName DemoGroup
StartTime : 11/22/2016 6:44:00 PM -08:00
ExpiryTime : 12/31/9999 3:59:00 PM -08:00
IsEnabled : True
NextRun : 11/28/2016 6:44:00 PM -08:00
Interval : 1
Frequency : Week
MonthlyScheduleOptions : Microsoft.Azure.Commands.Automation.Model.MonthlyScheduleOptions
WeeklyScheduleOptions : Microsoft.Azure.Commands.Automation.Model.WeeklyScheduleOptions
TimeZone : America/Los_Angeles
ResourceGroupName : DemoGroup
AutomationAccountName : DemoAccount
Name : Every1WeekOnMonday
CreationTime : 11/22/2016 6:15:08 PM -08:00
LastModifiedTime : 11/22/2016 6:15:08 PM -08:00
Description :
PS C:\Users\Joe> Get-Module -Name AzureRM.Automation
ModuleType Version Name ExportedCommands
---------- ------- ---- ----------------
Manifest 2.3.0 AzureRM.Automation {Export-AzureRmAutomationDscConfiguration, Export-AzureRmAutomationD...
因此,您可以通过upgrading to the latest version AzureRM PowerShell cmdlet解决此问题。