{"id":2589,"date":"2014-01-27T21:31:02","date_gmt":"2014-01-27T21:31:02","guid":{"rendered":"https:\/\/pipe2text.com\/?page_id=2589"},"modified":"2014-01-27T21:34:36","modified_gmt":"2014-01-27T21:34:36","slug":"list-details-of-azure-virtual-machines-such-as-instance-size-ip-address-powerstate-etc","status":"publish","type":"page","link":"https:\/\/pipe2text.com\/?page_id=2589","title":{"rendered":"List details about Azure Virtual Machines such as Instance Size, IP Address, PowerState etc"},"content":{"rendered":"<p>The following article will demonstrate how to gather details about your Azure VM&#8217;s via PowerShell commands.<\/p>\n<p>First step is to verify you are in the correct Azure Subscription. To connect to the correct subscription you want to report on you can do the following:<\/p>\n<p><strong>PS C:\\&gt; Select-AzureSubscription<\/strong><\/p>\n<p><strong>cmdlet Select-AzureSubscription at command pipeline position 1 Supply values for the following parameters: (Type !? for Help.) SubscriptionName: Subscription4<\/strong><\/p>\n<p>Now the commands you run will run against \u201csubscription4\u2033 instead of the default subscription. Substitute your subscription name for Subscription4 of course.<\/p>\n<p>Once you are in the correct subscription you can run the following command. This will bring back the following values.<\/p>\n<p>Name, IpAddress, DNSName, InstanceSize, PowerState<\/p>\n<p><strong>C:\\&gt; Get-AzureVM | Get-AzureVM | Format-List Name, IpAddress, DNSName, InstanceSize, PowerState &gt; c:\\files\\servers.txt<\/strong><\/p>\n<p>Name : Server1<br \/>\nIpAddress : 10.1.2.3<br \/>\nDNSName : http:\/\/Server1.cloudapp.net\/<br \/>\nInstanceSize : Medium<br \/>\nPowerState : Started<\/p>\n<p>Name : Server2<br \/>\nIpAddress : 10.1.2.4<br \/>\nDNSName : http:\/\/Server2.cloudapp.net\/<br \/>\nInstanceSize : Large<br \/>\nPowerState : Started<\/p>\n<p>Name : Server3<br \/>\nIpAddress : 10.1.2.5<br \/>\nDNSName : http:\/\/Server3.cloudapp.net\/<br \/>\nInstanceSize : ExtraLarge<br \/>\nPowerState : Started<\/p>\n<p>Name : Server4<br \/>\nIpAddress : 10.1.2.6<br \/>\nDNSName : http:\/\/Server4.cloudapp.net\/<br \/>\nInstanceSize : ExtraLarge<br \/>\nPowerState : Started<\/p>\n<p>The entire list of values for this command are as follows. Meaning, after the format list part of the above command, you can specify any of these values.<\/p>\n<p>DeploymentName<br \/>\nName<br \/>\nLabel<br \/>\nVM<br \/>\nInstanceStatus<br \/>\nIpAddress<br \/>\nInstanceStateDetails<br \/>\nPowerState<br \/>\nInstanceErrorCode<br \/>\nInstanceFaultDomain<br \/>\nInstanceName<br \/>\nInstanceUpgradeDomain<br \/>\nInstanceSize<br \/>\nAvailabilitySetName<br \/>\nDNSName<br \/>\nServiceName<br \/>\nOperationDescription<br \/>\nOperationId<br \/>\nOperationStatus<\/p>\n","protected":false},"excerpt":{"rendered":"<p>The following article will demonstrate how to gather details about your Azure VM&#8217;s via PowerShell commands. First step is to verify you are in the correct Azure Subscription. To connect to the correct subscription you want to report on you &hellip; <a href=\"https:\/\/pipe2text.com\/?page_id=2589\">Continue reading <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":3,"featured_media":0,"parent":1840,"menu_order":0,"comment_status":"open","ping_status":"open","template":"","meta":{"_coblocks_attr":"","_coblocks_dimensions":"","_coblocks_responsive_height":"","_coblocks_accordion_ie_support":"","footnotes":""},"class_list":["post-2589","page","type-page","status-publish","hentry"],"_links":{"self":[{"href":"https:\/\/pipe2text.com\/index.php?rest_route=\/wp\/v2\/pages\/2589","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/pipe2text.com\/index.php?rest_route=\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/pipe2text.com\/index.php?rest_route=\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/pipe2text.com\/index.php?rest_route=\/wp\/v2\/users\/3"}],"replies":[{"embeddable":true,"href":"https:\/\/pipe2text.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=2589"}],"version-history":[{"count":4,"href":"https:\/\/pipe2text.com\/index.php?rest_route=\/wp\/v2\/pages\/2589\/revisions"}],"predecessor-version":[{"id":2593,"href":"https:\/\/pipe2text.com\/index.php?rest_route=\/wp\/v2\/pages\/2589\/revisions\/2593"}],"up":[{"embeddable":true,"href":"https:\/\/pipe2text.com\/index.php?rest_route=\/wp\/v2\/pages\/1840"}],"wp:attachment":[{"href":"https:\/\/pipe2text.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=2589"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}