Closed mgfink closed 5 years ago
@mgfink Can you provide a debug trace of this error? You can get this using $DebugPreference="Continue"
before runnignt eh cmdlet. If you are runnign in Azure Automation, executing in the test pane with this setting will get you debug output.
[Uploading singleton.txt…]() @markcowl I tried scoping this to a single resource to keep this a little cleaner. The attached shows the 400 error along with other output.
I'm not sure if something changed but now when I run the command I don't get the -ExpandProperties output. In some cases, I can see that additional input in the debug output (eg. SSL cert hostnames, expiration dates, etc.; however, now when I call the command with -ExpandProperties, none of that shows up in the command output (without debug set).
Do you have a test env this could be validated on? We're trying to use the command to retrieve SSL cert info to determine when they expire.
Thanks!
@mgfink We don't have a test cluster that has your data on it, and this looks very data specific. We need the debug trace, or it is difficult to debug further - mainly we want to requests and response header info.
Also, why is using Get-AzWebsite not a solution for this?
@markcowl the previous attachment was run as requested with debug output. I ran the command you provided and added the -debug flag from the cloud shell. Did the attachment not have what you were looking for?
My aversion to using Get-AzWebsite is that I don't want to iterate over each app to get the info and the command I had found before was able to provide the list of certs + expiration dates with a single command. If this isn't supported please advise.
@mgfink it should be supported, the issue here may be with getting correct api-versions (which the cmdlet shoudl handle for you)
but this is much simpler using the typed cmdlets, and they have the same proeprties that geteneric cmdlets do, that is, you can use Get-AzWebApp
without parameters to list allo of your web apps in the same fashion, and you can select the expected, typed properties for SSL certs.
The appropriate cmdlet for listing these is Get-AzWebAppCertificate
The underlying issue is related to the fact that the resource name for certificates contains invalid Uri characters, which will be fixed here: #8763 . Closing this in favor of the root bug, please track progress there.
Thanks for the update....will use the other CMDLET for now and follow #8763.
Description
When running Get-AzResource in the Azure Portal cloud shell, the command will fail if the -ExpandProperties flag is used. The command seems to correctly output the default info whether or not the -ExpandProperties flag is used; however, when it IS used additional errors are generated when gathering the expanded properties. For example:
Steps to reproduce
This command will fail using the Azure Portal cloud shell and with Azure Automation with the most recent modules installed.
Environment data
Module versions
Error output