Azure / Azure/azure-powershell

Get-AzAutomationJobOutputRecord output not properly matching Azure Runbook output

Open
#21,727 4 comments 0 reactions 0 assignees View on GitHub
act-codegen-extensibility-squad Automation bug customer-reported Service Attention
Dominant language
C#
Stars
4.8k
Forks
4.3k
Avg merge
2d 17h
Merged PRs (30d)
51

Description

### Description

The Get-AzAutomationJobOutput and Get-AzAutomationJobOutputRecord formatting is completely different from the same job's output in the AA RB itself. I misexpected the Get-AzAutomationJobOutputRecord command to be able to spit out the runjobs output in a similar format to the AA RB's output. Is there anyway i can manipulate the Get-AzAutomationJobOutputRecord output display to match that within the actual AA RB?

Thank you

### Issue script & Debug output

```PowerShell
Azure Automation Runbook Output:

Assigning dayNOC agents to their respective queue's

TenantId : allmytenantnumbers
Name : allmynames
Identity : allmyidentity
RoutingMethod : RoundRobin
DistributionLists : {}
Users : {myagent}
DistributionListsLastExpanded : 5/8/2023 3:01:56 PM +00:00
Agents : {myagent}
AllowOptOut : False
ConferenceMode : True
PresenceBasedRouting : False
AgentsCapped : False
AgentsInSyncWithDistributionLists : True
AgentAlertTime : 60
LanguageId : en-US
OverflowThreshold : 200
OverflowAction : Forward
OverflowActionTarget : Microsoft.Rtc.Management.Hosted.CallQueue.Models.Target
OverflowSharedVoicemailTextToSpeechPrompt :
OverflowSharedVoicemailAudioFilePrompt :
OverflowSharedVoicemailAudioFilePromptFileName :
EnableOverflowSharedVoicemailTranscription : False
EnableOverflowSharedVoicemailSystemPromptSuppression : False
```

Get-AzAutomationJobOutput(Record) output:

```

ResourceGroupName : rgn
AutomationAccountName : aa
JobId : jid
StreamRecordId : jid
Time : 2023-05-08 5:01:39 PM +00:00
Summary :
Type : Output

Value : {[value,
Assigning dayNOC agents to their respective queue's]}
ResourceGroupName : rgn
AutomationAccountName : aa
JobId : jid
Time : 2023-05-08 5:01:39 PM +00:00
Summary :
Assigning dayNOC agents to their respective queue's
Type : Output
```
```

### Environment data

```PowerShell
$PsVersionTable

Name Value
---- -----
PSVersion 7.3.4
PSEdition Core
GitCommitId 7.3.4
OS Microsoft Windows 10.0.22621
Platform Win32NT
PSCompatibleVersions {1.0, 2.0, 3.0, 4.0…}
PSRemotingProtocolVersion 2.3
SerializationVersion 1.1.0.1
WSManStackVersion 3.0
```

### Module versions

```PowerShell
PS C:\Windows\System32> Get-Module Az*

ModuleType Version PreRelease Name ExportedCommands
---------- ------- ---------- ---- ----------------
Script 2.11.2 Az.Accounts {Add-AzEnvironment, Clear-AzConfig, Clear-AzConte…
Script 1.9.0 Az.Automation {Export-AzAutomationDscConfiguration, Export-AzAu…
```

### Error output

_No response_

Contributor guide

Open the contributing guide

Research direction

Start with the Get-AzAutomationJobOutput and Get-AzAutomationJobOutputRecord cmdlets and reproduce the reported difference between Azure Automation Runbook output and returned records. Compare the output using the reported PowerShell 7.3.4, Az.Automation 1.9.0, and Az.Accounts 2.11.2 versions. Done should clarify whether matching the Runbook display is supported and document the result or expected behavior.

Written by the indexing model from the issue text.

Assessment

Tech stack
azure, powershell
Domain
cloud
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Quiet
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.