-
Notifications
You must be signed in to change notification settings - Fork 3.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Get-AzAutomationDscNode #10404
Comments
Thanks for the feedback! We are routing this to the appropriate team for follow-up. cc @zjalexander |
1 similar comment
Thanks for the feedback! We are routing this to the appropriate team for follow-up. cc @zjalexander |
I am able to repro this issue. cc @nitinbps Output: When I use -latest, there is no issue. As reported above. |
+1 I am experiencing same issue, only -Latest works here Also with added start and end time dosen't work
|
Hello! I can confirm this issue. The only way this Cmdlet works is with -Latest. Without it, or with -EndTime instead, I get: I tried adding a -stringToEscape parameter, but that, unsurprisingly, led to |
There is dependency on -Latest parameter being mandatory. As there is already a workaround, we will be picking up in Q4CY20. |
Currently, team is busy with other high priority items and this would be picked up in CY2021 Q1. |
This issue can be worked around using Invoke-AzRestMethod. Below is a alternative implementation of the command. It will work the way the official commandlet is expected to work.
Examples:
|
Thanks for the feedback! We are routing this to the appropriate team for follow-up. cc @jaspkaur28. Issue DetailsDescriptionThese are the commands I run with values hard-coded: $node = Get-AzAutomationDscNode -ResourceGroupName "xx" -Name "xx" -AutomationAccountName "xx" | ? { $_.Name -eq "xx" } Results:
Steps to reproduceGet-AzAutomationDscNodeReport -NodeId $node.Id -ResourceGroupName "xx" -AutomationAccountName "xx" Environment data
Module versionsDebug output
Error outputAt line:1 char:1
|
@SatishBoddu-MSFT Automation team has given a workaround for the issue. Please try and confirm. |
@NolanCui719 Apologies for the late reply. Please let us know if you had a chance to follow the workaround suggested here. Also this github thread has been open for quite sometime. Could you please let us know if you still need assistance on this issue ? Awaiting your reply. |
@navba-MSFT - Not OP, but I too have the same problem with Get-AzAutomationDscNodeReport, only -Latest works otherwise I receive the same error. I have tried the workaround and I receive the same issue. I've taken a look at the Azure Powershell repo. I confess I am out of my depth here... The below could be completely wrong but it is just a discrepency that I have spotted and am curious if it is the root of the issue due to the error relating to the URI escape string:
I note that the majority of the string properties referenced in AutomationPSClientDSC.cs are using escape strings added to their URIs, but all of them check for NOT rather than IS, apart from GetNodeReportListFilterString (which is called from GetAzureAutomationDscNodeReport.cs -> AutomationClient.ListDscNodeReports -> this.GetNodeReportListFilterString) i.e.
However, GetNodeReportListFilterString does not check for NOT string (note the missing ! and instead checks for IS)
Could this be the cause of the issues? It seems to be only the Get-AzAutomationDscNodeReport cmdlet that refers to this string property, which may explain why only this cmdlet is affected. (If I am right about the cause, which I may not be!) |
Thanks @BCOps for looking into this. It was a typo. Fixed in the above PR. |
Description
These are the commands I run with values hard-coded:
$node = Get-AzAutomationDscNode -ResourceGroupName "xx" -Name "xx" -AutomationAccountName "xx" | ? { $_.Name -eq "xx" }
$node.Id
Get-AzAutomationDscNodeReport -NodeId $node.Id -ResourceGroupName "xx" -AutomationAccountName "xx"
Results:
Get-AzAutomationDscNodeReport -NodeId $node.Id -ResourceGroupName "xx" -AutomationAccountName "xx"
Get-AzAutomationDscNodeReport : Value cannot be null.
Parameter name: stringToEscape
At line:1 char:1
Steps to reproduce
Environment data
Module versions
Debug output
Error output
At line:1 char:1
Reference:
https://docs.microsoft.com/en-us/powershell/module/az.automation/get-azautomationdscnodereport?view=azps-2.8.0
The text was updated successfully, but these errors were encountered: