Get-AzureAutomationJobOutput only returns 100 messages

时间:2015-04-23 05:39:01

标签: powershell azure azure-automation powershell-workflow

I'm using this:

$jobOutput = Get-AzureAutomationJobOutput -AutomationAccountName 'nonprodruntimebuild' -Id '1ca657d5-e9b6-4808-9386-40a88dd04271' -Stream "Any"

to get the job output based on a job Id.

However, it always returns an Object[] with 100 elements. When I look at the history in the Azure portal, I can see there are 143 pages. Each page has 25 messages, so there should be 143*25=3575 messages.

I have tried this with different job Ids, and each time I still only get 100.

Edit: I have tried using New-Object DateTime(2015,01,01) for the StartTime parameter, but I still get 100 messages.

1 个答案:

答案 0 :(得分:0)

原来100是页面大小(常量)。您需要使用-StartTime标志并指定稍后的时间来获取接下来的100条消息。