{"id":595,"date":"2021-06-22T20:03:05","date_gmt":"2021-06-22T20:03:05","guid":{"rendered":"https:\/\/www.spktechfit.com\/?p=595"},"modified":"2021-06-23T19:15:12","modified_gmt":"2021-06-23T19:15:12","slug":"2-powershell-cli","status":"publish","type":"post","link":"https:\/\/www.spktechfit.com\/?p=595","title":{"rendered":"3. PowerShell &#038; CLI"},"content":{"rendered":"<p>There is no programming on the exam (.NET, APIs, Java etc\u2026), but there are questions on scripting using Powershell and CLI<\/p>\n<h2>How is this tested?<\/h2>\n<p>You do not get to choose the scripting language, EG: they will tell you to use Powershell or Bash<\/p>\n<h3>Method 1: Performance based testing (note this is not common on the exam\u2026)<\/h3>\n<p>You are given an instance of Azure and asked to perform a set of tasks. EG:<\/p>\n<ul>\n<li>Create a Vnet with this name<\/li>\n<li>Create VM<\/li>\n<\/ul>\n<p><b>NOTE: you can perform the task any way you want, through portal, Powershell or CLI<\/b><\/p>\n<h3>Method 2: Code in question<\/h3>\n<p>An example for this would be: &#8220;Does the following line of code stop the Finance group accessing HR resources?&#8221;<\/p>\n<p>&nbsp;<\/p>\n<h2>Memorising PowerShell and CLI Commands<\/h2>\n<h3>Predictable CLI<\/h3>\n<p>There is an azure CLI reference page: <a href=\"https:\/\/docs.microsoft.com\/en-us\/cli\/azure\/reference-index?view=azure-cli-latest\">https:\/\/docs.microsoft.com\/en-us\/cli\/azure\/reference-index?view=azure-cli-latest<\/a><\/p>\n<p>All commands start with &#8220;az&#8221;<\/p>\n<p><b>Virtual Machines CLI commands are like this:<\/b><\/p>\n<ul style=\"margin-left: .375in; direction: ltr; unicode-bidi: embed; margin-top: 0in; margin-bottom: 0in;\" type=\"disc\">\n<li style=\"margin-top: 0; margin-bottom: 0; vertical-align: middle;\"><span style=\"font-family: Calibri; font-size: 11.0pt;\">Az vm list<\/span><\/li>\n<li style=\"margin-top: 0; margin-bottom: 0; vertical-align: middle;\"><span style=\"font-family: Calibri; font-size: 11.0pt;\">Az vm create<\/span><\/li>\n<li style=\"margin-top: 0; margin-bottom: 0; vertical-align: middle;\"><span style=\"font-family: Calibri; font-size: 11.0pt;\">Az vm delete<\/span><\/li>\n<\/ul>\n<p><b><br \/>\nAzure Virtual network commands are similar:<\/b><\/p>\n<ul>\n<li>Az network vnet list<\/li>\n<li>Az network vnet create<\/li>\n<li>Az network vnet delete<\/li>\n<li>Az network vnet subnet list<\/li>\n<li>Az network vnet subnet\u00a0 create<\/li>\n<li>Az network vnet subnet delete<\/li>\n<\/ul>\n<h2>Predictable PowerShell<\/h2>\n<p>Reference page: <a href=\"https:\/\/docs.microsoft.com\/en-us\/powershell\/azure\/?view=azps-5.8.0&amp;viewFallbackFrom=azps-3.3.0\">https:\/\/docs.microsoft.com\/en-us\/powershell\/azure\/?view=azps-5.8.0&amp;viewFallbackFrom=azps-3.3.0<\/a><\/p>\n<p><b>Virtual machine commands<\/b><\/p>\n<ul style=\"margin-left: .375in; direction: ltr; unicode-bidi: embed; margin-top: 0in; margin-bottom: 0in;\" type=\"disc\">\n<li style=\"margin-top: 0; margin-bottom: 0; vertical-align: middle;\"><span style=\"font-family: Calibri; font-size: 11.0pt;\">Get-AzVM<\/span><\/li>\n<li style=\"margin-top: 0; margin-bottom: 0; vertical-align: middle;\"><span style=\"font-family: Calibri; font-size: 11.0pt;\">New-AvZM<\/span><\/li>\n<li style=\"margin-top: 0; margin-bottom: 0; vertical-align: middle;\"><span style=\"font-family: Calibri; font-size: 11.0pt;\">Remove-AzVM<\/span><\/li>\n<\/ul>\n<p><b>Virtual network commands:<\/b><\/p>\n<ul style=\"margin-left: .375in; direction: ltr; unicode-bidi: embed; margin-top: 0in; margin-bottom: 0in;\" type=\"disc\">\n<li style=\"margin-top: 0; margin-bottom: 0; vertical-align: middle;\"><span style=\"font-family: Calibri; font-size: 11.0pt;\">Get-AzVirtualNetwork<\/span><\/li>\n<li style=\"margin-top: 0; margin-bottom: 0; vertical-align: middle;\"><span style=\"font-family: Calibri; font-size: 11.0pt;\">New-AzVirtualNetwork<\/span><\/li>\n<li style=\"margin-top: 0; margin-bottom: 0; vertical-align: middle;\"><span style=\"font-family: Calibri; font-size: 11.0pt;\">Remove-AzVirtualNetwork<\/span><\/li>\n<li style=\"margin-top: 0; margin-bottom: 0; vertical-align: middle;\"><span style=\"font-family: Calibri; font-size: 11.0pt;\">Get-AzVirtualNetworkSubnetConfig<\/span><\/li>\n<li style=\"margin-top: 0; margin-bottom: 0; vertical-align: middle;\"><span style=\"font-family: Calibri; font-size: 11.0pt;\">New-AzVirtualNetworkSubnetConfig<\/span><\/li>\n<li style=\"margin-top: 0; margin-bottom: 0; vertical-align: middle;\"><span style=\"font-family: Calibri; font-size: 11.0pt;\">Remove-AzVirtualNetworkSubnetConfig<\/span><\/li>\n<\/ul>\n<p><b>NOTE: Powershell module used to be called AzureRM but it is now AZ<\/b><\/p>\n","protected":false},"excerpt":{"rendered":"<p>There is no programming on the exam (.NET, APIs, Java etc\u2026), but there are questions on scripting using Powershell and CLI How is this tested? You do not get to choose the scripting language, EG: they will tell you to use Powershell or Bash Method 1: Performance based testing (note this is not common on [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"om_disable_all_campaigns":false,"_monsterinsights_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0,"footnotes":""},"categories":[13,3],"tags":[],"aioseo_notices":[],"_links":{"self":[{"href":"https:\/\/www.spktechfit.com\/index.php?rest_route=\/wp\/v2\/posts\/595"}],"collection":[{"href":"https:\/\/www.spktechfit.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.spktechfit.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.spktechfit.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.spktechfit.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=595"}],"version-history":[{"count":2,"href":"https:\/\/www.spktechfit.com\/index.php?rest_route=\/wp\/v2\/posts\/595\/revisions"}],"predecessor-version":[{"id":598,"href":"https:\/\/www.spktechfit.com\/index.php?rest_route=\/wp\/v2\/posts\/595\/revisions\/598"}],"wp:attachment":[{"href":"https:\/\/www.spktechfit.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=595"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.spktechfit.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=595"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.spktechfit.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=595"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}