{"id":78425,"date":"2016-05-31T11:59:46","date_gmt":"2016-05-31T18:59:46","guid":{"rendered":"https:\/\/blogs.technet.microsoft.com\/heyscriptingguy\/?p=78425"},"modified":"2019-02-18T09:10:42","modified_gmt":"2019-02-18T16:10:42","slug":"powertip-get-azure-virtual-machine-diagnostics-by-using-powershell","status":"publish","type":"post","link":"https:\/\/devblogs.microsoft.com\/scripting\/powertip-get-azure-virtual-machine-diagnostics-by-using-powershell\/","title":{"rendered":"PowerTip: Get Azure Virtual Machine Diagnostics by using PowerShell"},"content":{"rendered":"<p><strong>Summary<\/strong>: Use the Azure Resource Manager cmdlets to retrieve diagnostic data within Azure Resource Manager virtual machines.<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/devblogs.microsoft.com\/wp-content\/uploads\/sites\/29\/2019\/02\/q-for-powertip.jpg\" alt=\"Hey, Scripting Guy! Question\" \/>\u00a0Our QA department was asking a very specific question that I didn\u2019t know how to answer. Is there anything in an Azure virtual machine (VM) to show the <em>quality<\/em> of the boot and its startup?<\/p>\n<p style=\"padding-left: 30px\"><img decoding=\"async\" src=\"https:\/\/devblogs.microsoft.com\/wp-content\/uploads\/sites\/29\/2019\/02\/a-for-powertip.jpg\" alt=\"Hey, Scripting Guy! Answer\" \/>\u00a0Maybe this will help. You can access the boot diagnostics data with a single cmdlet. To retrieve the data for a single machine, use the <strong>Get-AzureRmVMBootDiagnosticsData<\/strong> cmdlet and add a parameter to target whether the machine is a Windows VM or Linux VM.\u00a0Here is an example:<\/p>\n<p style=\"padding-left: 90px\"><code>Get-AzureRmVMBootDiagnosticsData -ResourceGroupName HSG-AzureRG -Name HSG-Linux1 -Linux<\/code><\/p>\n<p style=\"padding-left: 30px\"><img decoding=\"async\" src=\"https:\/\/devblogs.microsoft.com\/wp-content\/uploads\/sites\/29\/2019\/02\/7610.Dr.ScriptoForTips.jpg\" alt=\"The Doctor\" \/><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Summary: Use the Azure Resource Manager cmdlets to retrieve diagnostic data within Azure Resource Manager virtual machines. \u00a0Our QA department was asking a very specific question that I didn\u2019t know how to answer. Is there anything in an Azure virtual machine (VM) to show the quality of the boot and its startup? \u00a0Maybe this will [&hellip;]<\/p>\n","protected":false},"author":596,"featured_media":87096,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[568,639,641],"tags":[56,356,154,45],"class_list":["post-78425","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-hey-scripting-guy","category-powertip","category-windows-powershell","tag-guest-blogger","tag-powertip","tag-sean-kearney","tag-windows-powershell"],"acf":[],"blog_post_summary":"<p>Summary: Use the Azure Resource Manager cmdlets to retrieve diagnostic data within Azure Resource Manager virtual machines. \u00a0Our QA department was asking a very specific question that I didn\u2019t know how to answer. Is there anything in an Azure virtual machine (VM) to show the quality of the boot and its startup? \u00a0Maybe this will [&hellip;]<\/p>\n","_links":{"self":[{"href":"https:\/\/devblogs.microsoft.com\/scripting\/wp-json\/wp\/v2\/posts\/78425","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/devblogs.microsoft.com\/scripting\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/devblogs.microsoft.com\/scripting\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/scripting\/wp-json\/wp\/v2\/users\/596"}],"replies":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/scripting\/wp-json\/wp\/v2\/comments?post=78425"}],"version-history":[{"count":0,"href":"https:\/\/devblogs.microsoft.com\/scripting\/wp-json\/wp\/v2\/posts\/78425\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/scripting\/wp-json\/wp\/v2\/media\/87096"}],"wp:attachment":[{"href":"https:\/\/devblogs.microsoft.com\/scripting\/wp-json\/wp\/v2\/media?parent=78425"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/scripting\/wp-json\/wp\/v2\/categories?post=78425"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/scripting\/wp-json\/wp\/v2\/tags?post=78425"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}