{"id":10447,"date":"2019-08-08T00:00:00","date_gmt":"2019-08-08T05:00:00","guid":{"rendered":"https:\/\/threecloud.wpengine.com\/post\/using-powershell-in-the-azure-portal\/"},"modified":"2022-11-30T09:11:53","modified_gmt":"2022-11-30T15:11:53","slug":"using-powershell-in-the-azure-portal","status":"publish","type":"post","link":"https:\/\/3cloudsolutions.com\/resources\/using-powershell-in-the-azure-portal\/","title":{"rendered":"Using PowerShell in the Azure Portal"},"content":{"rendered":"<p><strong>Did you know that the Azure Portal has a feature to connect using PowerShell in the cloud? With this there\u2019s no need to connect using local PowerShell; simply connect, authenticate and start running commands on your Azure site.<\/strong> In this post, I\u2019ll demo how to use this nice feature.<br \/>\n<iframe loading=\"lazy\" src=\"https:\/\/www.youtube.com\/embed\/SnR3DoH6wwg\" width=\"560\" height=\"315\" frameborder=\"0\" allowfullscreen=\"allowfullscreen\"><\/iframe><\/p>\n<\/p>\n<ul>\n<li>When logged into the Azure Portal, click on the Cloud Shell button in the top ribbon.<\/li>\n<li>This will open a box where you can log in with Bash or PowerShell; I\u2019ll use PowerShell for this example.<\/li>\n<li>Right away, you\u2019ll see that it\u2019s attempting to log us in, and I\u2019ll copy a command from that PowerShell window that will try to connect to our tenant.<\/li>\n<li>First, we need to verify authentication. To do this, I\u2019ll open a new window and enter the code we\u2019ll see in the PowerShell connection window in the portal when it prompts us to log in and then we\u2019ll be authenticated.<\/li>\n<li>Once I\u2019m logged in, I see I\u2019m connected and that I have a Tenant ID and a Subscription, so the Azure portal is now available for connection through PowerShell.<\/li>\n<li>We\u2019re not connected to the laptop here. Typically, we\u2019d log into our PowerShell locally, using the Windows PowerShell or the Windows PowerShell ISE. ISE allows you to save PS1 files as the file extension for the PowerShell and you can execute those another time, as well as parameterize them.<\/li>\n<li>When I\u2019m connected to my Azure PowerShell, I\u2019ll run a few commands to test it out. This should tell me my objects that I have access to.<\/li>\n<li>I\u2019ll then copy\/paste to list my Azure groups on my dashboard, and I see 3 groups; my RG Demo, Group and the third one is hosting this PowerShell session.<\/li>\n<li>Next, from my PowerShell notebook, I\u2019ll copy my RG Demo resource group and paste it into my PowerShell window. This will bring up my information regarding that group.<\/li>\n<li>I can also pinpoint a specific name of an object, in this case the Azure Data Factory PWC. I can go ahead and paste that into PowerShell, and it will give me some good information on that.<\/li>\n<\/ul>\n<p>There\u2019s a lot you can do with the PowerShell. For example, maybe I have a self-hosted integration runtime running my Azure Data Factory and I\u2019d like to pause that or restart it; I can do that with the Azure PowerShell.<\/p>\n<p>So, this is a nice feature that\u2019s hosted on the web as part of the Azure platform. <strong>It exposes a lot of functionality for administration purposes for monitoring and getting to the root access to much of that information.<\/strong><\/p>\n<p>We all know life can get hectic. Here at 3Cloud, we&#8217;re no different. But one of our goals is to learn something new about Azure every day, as things are constantly changing and being updated. Many people are still learning all the amazing things they can do within the Azure cloud and we want to help. Our posts in our Azure Every Day series are a great way to learn more about Azure each week.<\/p>\n<p><strong>Need further help? Our expert team and solution offerings can help your business with any Azure product or service, including Managed Services offerings. Contact us at 888-8AZURE or\u00a0 <a href=\"mailto:sales@3cloudsolutions.com\">sales@3cloudsolutions.com<\/a>.<\/strong><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Did you know that the Azure Portal has a feature to connect using PowerShell in&mldr;<\/p>\n","protected":false},"author":29,"featured_media":9312,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"content-type":"","footnotes":""},"categories":[260],"tags":[],"class_list":["post-10447","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-data-ai","topics-blog"],"acf":[],"_links":{"self":[{"href":"https:\/\/3cloudsolutions.com\/wp-json\/wp\/v2\/posts\/10447","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/3cloudsolutions.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/3cloudsolutions.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/3cloudsolutions.com\/wp-json\/wp\/v2\/users\/29"}],"replies":[{"embeddable":true,"href":"https:\/\/3cloudsolutions.com\/wp-json\/wp\/v2\/comments?post=10447"}],"version-history":[{"count":0,"href":"https:\/\/3cloudsolutions.com\/wp-json\/wp\/v2\/posts\/10447\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/3cloudsolutions.com\/wp-json\/wp\/v2\/media\/9312"}],"wp:attachment":[{"href":"https:\/\/3cloudsolutions.com\/wp-json\/wp\/v2\/media?parent=10447"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/3cloudsolutions.com\/wp-json\/wp\/v2\/categories?post=10447"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/3cloudsolutions.com\/wp-json\/wp\/v2\/tags?post=10447"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}