Azure / Azure/azure-powershell

Get-AzureRmAutomationDscCompilationJob JobParameters hashtable is always empty

Open
#5,329 2 comments 0 reactions 1 assignee Claimed by @vikram-m View on GitHub
act-codegen-extensibility-squad Automation automation-dsc Service Attention
Dominant language
C#
Stars
4.8k
Forks
4.3k
Avg merge
2d 17h
Merged PRs (30d)
51

Description

### Cmdlet(s)
`Get-AzureRmAutomationDscCompilationJob`

### PowerShell Version
Instructions: to get PowerShell version, type `$PSVersionTable` and look for the value associated with `PSVersion`
```
Name Value
---- -----
PSVersion 5.1.14409.1012
PSEdition Desktop
PSCompatibleVersions {1.0, 2.0, 3.0, 4.0...}
BuildVersion 10.0.14409.1012
CLRVersion 4.0.30319.42000
WSManStackVersion 3.0
PSRemotingProtocolVersion 2.3
SerializationVersion 1.1.0.1
```

### Module Version
```
PS C:\> Get-Command Get-AzureRmAutomationDscCompilationJob
CommandType Name Version Source
----------- ---- ------- ------
Cmdlet Get-AzureRmAutomationDscCompilationJob 4.1.1 AzureRM.Automation
```

### OS Version
Instructions: to get OS version, type `$PSversionTable` and look for value associated with `BuildVersion`

### Description
The property `JobParameters` hashtable is always empty. However, if I use resource explorer, I can see the compilation job's "parameters" listing all the ConfigurationData and parameters passed to the compilation job.

### Debug Output
Instructions: to get Debug Output, set `$DebugPreference="Continue"` and then execute the cmdlet or script causing the issue

I don't have time to redact the information. If someone from MS cares to contact me via email, I'll gladly share. (How about adding a feature that automatically redacts information that should remain out of the public domain).

### Script/Steps for Reproduction
```
$Job = Get-AzureRmAutomationDscCompilationJob -ConfigurationName "MyDscConfiguration" -ResourceGroupName $AARG -AutomationAccountName $AA

$LatestJob = $Job | Sort EndTime | Select -last 1

$LatestJob

ResourceGroupName : MyAARG
AutomationAccountName : MyAutomationAccount
Id : 21c3f990-1321-23b3-cbc2-fd9b6f7b31da
CreationTime : 19/01/2018 09:06:50 +00:00
Status : Completed
StatusDetails :
StartTime : 19/01/2018 09:11:15 +00:00
EndTime : 19/01/2018 09:13:55 +00:00
Exception :
LastModifiedTime : 19/01/2018 09:13:55 +00:00
LastStatusModifiedTime : 01/01/0001 00:00:00 +00:00
JobParameters : {}
ConfigurationName : MyDscConfiguration

#Just to confirm that there isn't anything in JobParameters:

$LatestJob.JobParameters.Count
0
```

In resource explorer ([https://resources.azure.com](https://resources.azure.com)), drill down:
Subscriptions >MySubscription > resourceGroups > MyAARG > providers > MyAutomationAccount > compilationjobs > 21c3f990-1321-23b3-cbc2-fd9b6f7b31da

All configuration data and parameters are shown. I'd expect the same information to be present in JobParameters

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.