title: How to get Object Id of Azure Resource using PowerShell
body: <p>How can I get the Object Id of an Azure resource using PowerShell cmdlets?</p>
  
  <p>I tried using <code>Get-AzureRmResource -ResourceName 'my-resource' | fl</code> but it fails with error: <code>Parameter set cannot be resolved using the specified named parameters</code></p>
  
  <p>I also tried using <code>Get-AzResource -Name 'my-resource'</code> but among the information it retrieves it doesn't include the Object Id.</p>