{"id":34,"date":"2016-03-08T13:02:35","date_gmt":"2016-03-08T13:02:35","guid":{"rendered":"http:\/\/cirwordpress.azurewebsites.net\/?p=34"},"modified":"2016-03-08T13:05:53","modified_gmt":"2016-03-08T13:05:53","slug":"azure-powershell-and-listing-subscriptions","status":"publish","type":"post","link":"http:\/\/www.ciraltos.com\/staging2\/azure-powershell-and-listing-subscriptions\/","title":{"rendered":"Azure PowerShell and Listing Subscriptions"},"content":{"rendered":"<p>When building an Azure VM with PowerShell you need to first login using the Login-AzureRmAccount. After that, use the Get-AzureSubscription to list the subscriptions on the account.\u00a0<!--more--><\/p>\n<p>There is one (or two) steps missed between these two commands. Per the MSDN documentation, Get-AzureSubsciption requires the Add-AzureAccount command first, or use the Get-AzurePublishSettingsFile, Import-AzurePublishSettingsFile to install the publish settings file locally.<\/p>\n<p>The correct process is:<br \/>\nLogin-AzureRmAccount<br \/>\nAdd-AzureAccount<br \/>\nGet-AzureSubscription<\/p>\n<p>The link below lists the requirements for the Get-AzureSubscription command.<br \/>\n<a href=\"https:\/\/msdn.microsoft.com\/en-us\/library\/dn790366.aspx\">https:\/\/msdn.microsoft.com\/en-us\/library\/dn790366.aspx<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>When building an Azure VM with PowerShell you need to first login using the Login-AzureRmAccount. After that, use the Get-AzureSubscription to list the subscriptions on the account.\u00a0<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"site-sidebar-layout":"default","site-content-layout":"default","ast-global-header-display":"","ast-main-header-display":"","ast-hfb-above-header-display":"","ast-hfb-below-header-display":"","ast-hfb-mobile-header-display":"","site-post-title":"","ast-breadcrumbs-content":"","ast-featured-img":"","footer-sml-layout":"","theme-transparent-header-meta":"","adv-header-id-meta":"","stick-header-meta":"","header-above-stick-meta":"","header-main-stick-meta":"","header-below-stick-meta":""},"categories":[2],"tags":[22,9,12,23,21,25,20,24,27,26],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v20.3 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Azure PowerShell and Listing Subscriptions - ciraltos<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"http:\/\/www.ciraltos.com\/staging2\/azure-powershell-and-listing-subscriptions\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Azure PowerShell and Listing Subscriptions - ciraltos\" \/>\n<meta property=\"og:description\" content=\"When building an Azure VM with PowerShell you need to first login using the Login-AzureRmAccount. After that, use the Get-AzureSubscription to list the subscriptions on the account.\u00a0\" \/>\n<meta property=\"og:url\" content=\"http:\/\/www.ciraltos.com\/staging2\/azure-powershell-and-listing-subscriptions\/\" \/>\n<meta property=\"og:site_name\" content=\"ciraltos\" \/>\n<meta property=\"article:published_time\" content=\"2016-03-08T13:02:35+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2016-03-08T13:05:53+00:00\" \/>\n<meta name=\"author\" content=\"Travis Roberts\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@ciraltos\" \/>\n<meta name=\"twitter:site\" content=\"@ciraltos\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Travis Roberts\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"http:\/\/www.ciraltos.com\/staging2\/azure-powershell-and-listing-subscriptions\/#article\",\"isPartOf\":{\"@id\":\"http:\/\/www.ciraltos.com\/staging2\/azure-powershell-and-listing-subscriptions\/\"},\"author\":{\"name\":\"Travis Roberts\",\"@id\":\"http:\/\/www.ciraltos.com\/staging2\/#\/schema\/person\/25391996d6cddfecd4d257162b7e373a\"},\"headline\":\"Azure PowerShell and Listing Subscriptions\",\"datePublished\":\"2016-03-08T13:02:35+00:00\",\"dateModified\":\"2016-03-08T13:05:53+00:00\",\"mainEntityOfPage\":{\"@id\":\"http:\/\/www.ciraltos.com\/staging2\/azure-powershell-and-listing-subscriptions\/\"},\"wordCount\":90,\"commentCount\":0,\"publisher\":{\"@id\":\"http:\/\/www.ciraltos.com\/staging2\/#\/schema\/person\/25391996d6cddfecd4d257162b7e373a\"},\"keywords\":[\"Add-AzureAccount\",\"Azure\",\"cloud\",\"Get-AzureSubscription\",\"Login-AzureRmAccount\",\"MSDN\",\"Powershell\",\"subscription\",\"virtual machine\",\"VM\"],\"articleSection\":[\"Azure\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"http:\/\/www.ciraltos.com\/staging2\/azure-powershell-and-listing-subscriptions\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"http:\/\/www.ciraltos.com\/staging2\/azure-powershell-and-listing-subscriptions\/\",\"url\":\"http:\/\/www.ciraltos.com\/staging2\/azure-powershell-and-listing-subscriptions\/\",\"name\":\"Azure PowerShell and Listing Subscriptions - ciraltos\",\"isPartOf\":{\"@id\":\"http:\/\/www.ciraltos.com\/staging2\/#website\"},\"datePublished\":\"2016-03-08T13:02:35+00:00\",\"dateModified\":\"2016-03-08T13:05:53+00:00\",\"breadcrumb\":{\"@id\":\"http:\/\/www.ciraltos.com\/staging2\/azure-powershell-and-listing-subscriptions\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"http:\/\/www.ciraltos.com\/staging2\/azure-powershell-and-listing-subscriptions\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"http:\/\/www.ciraltos.com\/staging2\/azure-powershell-and-listing-subscriptions\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"http:\/\/www.ciraltos.com\/staging2\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Azure PowerShell and Listing Subscriptions\"}]},{\"@type\":\"WebSite\",\"@id\":\"http:\/\/www.ciraltos.com\/staging2\/#website\",\"url\":\"http:\/\/www.ciraltos.com\/staging2\/\",\"name\":\"ciraltos\",\"description\":\"cloud, technology and trends\",\"publisher\":{\"@id\":\"http:\/\/www.ciraltos.com\/staging2\/#\/schema\/person\/25391996d6cddfecd4d257162b7e373a\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"http:\/\/www.ciraltos.com\/staging2\/?s={search_term_string}\"},\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"en-US\"},{\"@type\":[\"Person\",\"Organization\"],\"@id\":\"http:\/\/www.ciraltos.com\/staging2\/#\/schema\/person\/25391996d6cddfecd4d257162b7e373a\",\"name\":\"Travis Roberts\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"http:\/\/www.ciraltos.com\/staging2\/#\/schema\/person\/image\/\",\"url\":\"http:\/\/www.ciraltos.com\/staging2\/wp-content\/uploads\/2023\/03\/Logo-1.png\",\"contentUrl\":\"http:\/\/www.ciraltos.com\/staging2\/wp-content\/uploads\/2023\/03\/Logo-1.png\",\"width\":5657,\"height\":3563,\"caption\":\"Travis Roberts\"},\"logo\":{\"@id\":\"http:\/\/www.ciraltos.com\/staging2\/#\/schema\/person\/image\/\"},\"sameAs\":[\"http:\/\/www.ciraltos.com\",\"https:\/\/twitter.com\/ciraltos\"],\"url\":\"http:\/\/www.ciraltos.com\/staging2\/author\/admin\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Azure PowerShell and Listing Subscriptions - ciraltos","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"http:\/\/www.ciraltos.com\/staging2\/azure-powershell-and-listing-subscriptions\/","og_locale":"en_US","og_type":"article","og_title":"Azure PowerShell and Listing Subscriptions - ciraltos","og_description":"When building an Azure VM with PowerShell you need to first login using the Login-AzureRmAccount. After that, use the Get-AzureSubscription to list the subscriptions on the account.\u00a0","og_url":"http:\/\/www.ciraltos.com\/staging2\/azure-powershell-and-listing-subscriptions\/","og_site_name":"ciraltos","article_published_time":"2016-03-08T13:02:35+00:00","article_modified_time":"2016-03-08T13:05:53+00:00","author":"Travis Roberts","twitter_card":"summary_large_image","twitter_creator":"@ciraltos","twitter_site":"@ciraltos","twitter_misc":{"Written by":"Travis Roberts"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"http:\/\/www.ciraltos.com\/staging2\/azure-powershell-and-listing-subscriptions\/#article","isPartOf":{"@id":"http:\/\/www.ciraltos.com\/staging2\/azure-powershell-and-listing-subscriptions\/"},"author":{"name":"Travis Roberts","@id":"http:\/\/www.ciraltos.com\/staging2\/#\/schema\/person\/25391996d6cddfecd4d257162b7e373a"},"headline":"Azure PowerShell and Listing Subscriptions","datePublished":"2016-03-08T13:02:35+00:00","dateModified":"2016-03-08T13:05:53+00:00","mainEntityOfPage":{"@id":"http:\/\/www.ciraltos.com\/staging2\/azure-powershell-and-listing-subscriptions\/"},"wordCount":90,"commentCount":0,"publisher":{"@id":"http:\/\/www.ciraltos.com\/staging2\/#\/schema\/person\/25391996d6cddfecd4d257162b7e373a"},"keywords":["Add-AzureAccount","Azure","cloud","Get-AzureSubscription","Login-AzureRmAccount","MSDN","Powershell","subscription","virtual machine","VM"],"articleSection":["Azure"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["http:\/\/www.ciraltos.com\/staging2\/azure-powershell-and-listing-subscriptions\/#respond"]}]},{"@type":"WebPage","@id":"http:\/\/www.ciraltos.com\/staging2\/azure-powershell-and-listing-subscriptions\/","url":"http:\/\/www.ciraltos.com\/staging2\/azure-powershell-and-listing-subscriptions\/","name":"Azure PowerShell and Listing Subscriptions - ciraltos","isPartOf":{"@id":"http:\/\/www.ciraltos.com\/staging2\/#website"},"datePublished":"2016-03-08T13:02:35+00:00","dateModified":"2016-03-08T13:05:53+00:00","breadcrumb":{"@id":"http:\/\/www.ciraltos.com\/staging2\/azure-powershell-and-listing-subscriptions\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["http:\/\/www.ciraltos.com\/staging2\/azure-powershell-and-listing-subscriptions\/"]}]},{"@type":"BreadcrumbList","@id":"http:\/\/www.ciraltos.com\/staging2\/azure-powershell-and-listing-subscriptions\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"http:\/\/www.ciraltos.com\/staging2\/"},{"@type":"ListItem","position":2,"name":"Azure PowerShell and Listing Subscriptions"}]},{"@type":"WebSite","@id":"http:\/\/www.ciraltos.com\/staging2\/#website","url":"http:\/\/www.ciraltos.com\/staging2\/","name":"ciraltos","description":"cloud, technology and trends","publisher":{"@id":"http:\/\/www.ciraltos.com\/staging2\/#\/schema\/person\/25391996d6cddfecd4d257162b7e373a"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"http:\/\/www.ciraltos.com\/staging2\/?s={search_term_string}"},"query-input":"required name=search_term_string"}],"inLanguage":"en-US"},{"@type":["Person","Organization"],"@id":"http:\/\/www.ciraltos.com\/staging2\/#\/schema\/person\/25391996d6cddfecd4d257162b7e373a","name":"Travis Roberts","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"http:\/\/www.ciraltos.com\/staging2\/#\/schema\/person\/image\/","url":"http:\/\/www.ciraltos.com\/staging2\/wp-content\/uploads\/2023\/03\/Logo-1.png","contentUrl":"http:\/\/www.ciraltos.com\/staging2\/wp-content\/uploads\/2023\/03\/Logo-1.png","width":5657,"height":3563,"caption":"Travis Roberts"},"logo":{"@id":"http:\/\/www.ciraltos.com\/staging2\/#\/schema\/person\/image\/"},"sameAs":["http:\/\/www.ciraltos.com","https:\/\/twitter.com\/ciraltos"],"url":"http:\/\/www.ciraltos.com\/staging2\/author\/admin\/"}]}},"_links":{"self":[{"href":"http:\/\/www.ciraltos.com\/staging2\/wp-json\/wp\/v2\/posts\/34"}],"collection":[{"href":"http:\/\/www.ciraltos.com\/staging2\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/www.ciraltos.com\/staging2\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/www.ciraltos.com\/staging2\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/www.ciraltos.com\/staging2\/wp-json\/wp\/v2\/comments?post=34"}],"version-history":[{"count":3,"href":"http:\/\/www.ciraltos.com\/staging2\/wp-json\/wp\/v2\/posts\/34\/revisions"}],"predecessor-version":[{"id":38,"href":"http:\/\/www.ciraltos.com\/staging2\/wp-json\/wp\/v2\/posts\/34\/revisions\/38"}],"wp:attachment":[{"href":"http:\/\/www.ciraltos.com\/staging2\/wp-json\/wp\/v2\/media?parent=34"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/www.ciraltos.com\/staging2\/wp-json\/wp\/v2\/categories?post=34"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/www.ciraltos.com\/staging2\/wp-json\/wp\/v2\/tags?post=34"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}