I'm trying to get the publishing credentials of a website using AzureRm and PowerShell using Invoke-AzureRmResourceAction and PowerShell.
In this answer @David Ebbo explains how to do it using ResourceName and ResourceGroupName as parameters of the Invoke-AzureRmResourceAction cmdlet. I've tried that and it works perfectly and the object I get back has an Id property that looks a lot like a ResourceId.
I've tried using that Id as the ResourceId parameter and removing ResourceName and ResourceGroupName but I get an error saying the resource doesn't exist.
I'd like to use ResourceId because I need to automate this for a series of Websites in different resource groups and I only have (easy) access to the ResourceId (and the ResourceId of the website looks really similar to the Id of the publishing credentials object I get using ResourceName and ResourceGroupName).
Thanks!