检索具有每周触发的特定计划的 Azure Runbook 计划列表会产生错误
Retrieval of Azure Runbook schedules list having a particular schedule triggered on a weekly basis generates an error
我最近创建了一个定期执行的 运行 图书计划 - 每 1 周的星期一,没有到期日。
时间表的创建是完美的。
但是,当我想使用 powershell cmdlet
检索所有 运行 图书时间表的列表时
Get-AzureAutomationSchedule -AutomationAccountName $automationAccountName
i get an error message:
Get-AzureAutomationSchedule : Nie można znaleźć żądanej wartości 'Week'. (The value 'Week' could not be found)
+ Get-AzureAutomationSchedule -AutomationAccountName $automationAccoun ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : CloseError: (:) [Get-AzureAutomationSchedule], ArgumentException
+ FullyQualifiedErrorId : Microsoft.Azure.Commands.Automation.Cmdlet.GetAzureAutomationSchedule
当我删除这个特定的时间表时,会出现可用时间表的完整列表。
在 hourly/daily 的基础上,我也有比 运行 更好的时间表,它们不会产生此类问题。
如有任何帮助,我们将不胜感激。
按照@4c74356b41 的建议运行 执行命令Get-AzureRmAutomationSchedule -Name name_of_the_failing_schedule
后,我收到相同的错误消息。
在调试模式下 运行ning cmdlet
后,您可以在下面看到 http 响应的主体
{
"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"
]
}
}
我在旧版本的 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 解决此问题。
我最近创建了一个定期执行的 运行 图书计划 - 每 1 周的星期一,没有到期日。 时间表的创建是完美的。 但是,当我想使用 powershell cmdlet
检索所有 运行 图书时间表的列表时Get-AzureAutomationSchedule -AutomationAccountName $automationAccountName
i get an error message:
Get-AzureAutomationSchedule : Nie można znaleźć żądanej wartości 'Week'. (The value 'Week' could not be found)
+ Get-AzureAutomationSchedule -AutomationAccountName $automationAccoun ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : CloseError: (:) [Get-AzureAutomationSchedule], ArgumentException
+ FullyQualifiedErrorId : Microsoft.Azure.Commands.Automation.Cmdlet.GetAzureAutomationSchedule
当我删除这个特定的时间表时,会出现可用时间表的完整列表。
在 hourly/daily 的基础上,我也有比 运行 更好的时间表,它们不会产生此类问题。
如有任何帮助,我们将不胜感激。
按照@4c74356b41 的建议运行 执行命令Get-AzureRmAutomationSchedule -Name name_of_the_failing_schedule
后,我收到相同的错误消息。
在调试模式下 运行ning cmdlet
后,您可以在下面看到 http 响应的主体{
"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"
]
}
}
我在旧版本的 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 解决此问题。