{"id":2472,"date":"2018-07-26T19:12:40","date_gmt":"2018-07-26T18:12:40","guid":{"rendered":"http:\/\/blog.repsaj.nl\/?p=2472"},"modified":"2018-07-26T11:18:55","modified_gmt":"2018-07-26T10:18:55","slug":"azure-removing-debugger-nat-rules-for-service-fabric-load-balancer","status":"publish","type":"post","link":"http:\/\/blog.repsaj.nl\/index.php\/2018\/07\/azure-removing-debugger-nat-rules-for-service-fabric-load-balancer\/","title":{"rendered":"[Azure] Removing Debugger NAT rules for service fabric load balancer"},"content":{"rendered":"<p>Sometimes your project forces you to do something you rather wouldn&#8217;t: debug in staging or production. Although you should definitely try to avoid these situations, sometimes sh*t just happens and that&#8217;s fine. If your project is running on Service Fabric, Azure offers you the option to attach a debugger right from within Visual Studio. This is a very powerful option which creates a connection between VS and your service fabric nodes in order to communicate with the remote debugger.\u00a0<!--more--><\/p>\n<p>To facilitate this connection, some rules are added in the load balancer which point certain ports to the machines in your VM scale sets. We have found that for each role you&#8217;re running, you&#8217;ll get 4 rules to open up 4 different ports. Best practice would be to, after you&#8217;ve finished debugging, to remove these rules again by disabling the debugger functionality (which you easily can do from Visual Studio as well). In practice we&#8217;ve found that our devs sometimes forget (or neglect, whatever you prefer) to do this. This presents us with two problems:<\/p>\n<ol>\n<li>You&#8217;ve got some additional ports opened up, which impact the security of your nodes. This doesn&#8217;t mean you get easy access, but each additional port is a potential security risk by definition.<\/li>\n<li>If you&#8217;re rolling out your infrastructure using ARM templates, your deployment will now fail when using the &#8216;Incremental&#8217; mode. It will detect the additional rules and hold deployment.<\/li>\n<\/ol>\n<p>In order to resolve these issues without having to bother the developers each time, I created two Powershell functions you can use to automate the removal of the debugger rules. These scripts rely on the AzureRM module, so you&#8217;ll need that one installed. To use these functions, first\u00a0<strong>log in<\/strong> (Connect-AzureRMAccount) and <strong>select<\/strong> the correct <strong>subscription<\/strong> (Select-AzureRMSubscription). After that, the rest is as simple as calling <strong>Remove-VMScaleSetDebuggerNatPools\u00a0<\/strong>and\u00a0<strong>Remove-LoadBalancerDebuggerNatPools<\/strong>!<\/p>\n<h3>Remove-VMScaleSetDebuggerNatPools<\/h3>\n<style>.gist table { margin-bottom: 0; }<\/style>\n<div style=\"tab-size: 8\" id=\"gist90968259\" class=\"gist\">\n<div class=\"gist-file\" translate=\"no\" data-color-mode=\"light\" data-light-theme=\"light\">\n<div class=\"gist-data\">\n<div class=\"js-gist-file-update-container js-task-list-container\">\n<div id=\"file-gistfile1-txt\" class=\"file my-2\">\n<div itemprop=\"text\"\n      class=\"Box-body p-0 blob-wrapper data type-text  \"\n      style=\"overflow: auto\" tabindex=\"0\" role=\"region\"\n      aria-label=\"gistfile1.txt content, created by jsiegmund on 09:44AM on July 26, 2018.\"\n    ><\/p>\n<div class=\"js-check-hidden-unicode js-blob-code-container blob-code-content\">\n<p>  <template class=\"js-file-alert-template\"><\/p>\n<div data-view-component=\"true\" class=\"flash flash-warn flash-full d-flex flex-items-center\">\n  <svg aria-hidden=\"true\" height=\"16\" viewBox=\"0 0 16 16\" version=\"1.1\" width=\"16\" data-view-component=\"true\" class=\"octicon octicon-alert\">\n    <path d=\"M6.457 1.047c.659-1.234 2.427-1.234 3.086 0l6.082 11.378A1.75 1.75 0 0 1 14.082 15H1.918a1.75 1.75 0 0 1-1.543-2.575Zm1.763.707a.25.25 0 0 0-.44 0L1.698 13.132a.25.25 0 0 0 .22.368h12.164a.25.25 0 0 0 .22-.368Zm.53 3.996v2.5a.75.75 0 0 1-1.5 0v-2.5a.75.75 0 0 1 1.5 0ZM9 11a1 1 0 1 1-2 0 1 1 0 0 1 2 0Z\"><\/path>\n<\/svg><br \/>\n    <span><br \/>\n      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.<br \/>\n      <a class=\"Link--inTextBlock\" href=\"https:\/\/github.co\/hiddenchars\" target=\"_blank\">Learn more about bidirectional Unicode characters<\/a><br \/>\n    <\/span><\/p>\n<div data-view-component=\"true\" class=\"flash-action\">        <a href=\"{{ revealButtonHref }}\" data-view-component=\"true\" class=\"btn-sm btn\">    Show hidden characters<br \/>\n<\/a>\n<\/div>\n<\/div>\n<p><\/template><br \/>\n<template class=\"js-line-alert-template\"><br \/>\n  <span aria-label=\"This line has hidden Unicode characters\" data-view-component=\"true\" class=\"line-alert tooltipped tooltipped-e\"><br \/>\n    <svg aria-hidden=\"true\" height=\"16\" viewBox=\"0 0 16 16\" version=\"1.1\" width=\"16\" data-view-component=\"true\" class=\"octicon octicon-alert\">\n    <path d=\"M6.457 1.047c.659-1.234 2.427-1.234 3.086 0l6.082 11.378A1.75 1.75 0 0 1 14.082 15H1.918a1.75 1.75 0 0 1-1.543-2.575Zm1.763.707a.25.25 0 0 0-.44 0L1.698 13.132a.25.25 0 0 0 .22.368h12.164a.25.25 0 0 0 .22-.368Zm.53 3.996v2.5a.75.75 0 0 1-1.5 0v-2.5a.75.75 0 0 1 1.5 0ZM9 11a1 1 0 1 1-2 0 1 1 0 0 1 2 0Z\"><\/path>\n<\/svg><br \/>\n<\/span><\/template><\/p>\n<div class=\"table\"><table data-hpc class=\"highlight tab-size js-file-line-container\" data-tab-size=\"4\" data-paste-markdown-skip data-tagsearch-path=\"gistfile1.txt\">\n<tr>\n<td id=\"file-gistfile1-txt-L1\" class=\"blob-num js-line-number js-blob-rnum\" data-line-number=\"1\"><\/td>\n<td id=\"file-gistfile1-txt-LC1\" class=\"blob-code blob-code-inner js-file-line\">function Remove-VMScaleSetDebuggerNatPools {<\/td>\n<\/tr>\n<tr>\n<td id=\"file-gistfile1-txt-L2\" class=\"blob-num js-line-number js-blob-rnum\" data-line-number=\"2\"><\/td>\n<td id=\"file-gistfile1-txt-LC2\" class=\"blob-code blob-code-inner js-file-line\">    param (<\/td>\n<\/tr>\n<tr>\n<td id=\"file-gistfile1-txt-L3\" class=\"blob-num js-line-number js-blob-rnum\" data-line-number=\"3\"><\/td>\n<td id=\"file-gistfile1-txt-LC3\" class=\"blob-code blob-code-inner js-file-line\">        [string]$ResourceGroupName,<\/td>\n<\/tr>\n<tr>\n<td id=\"file-gistfile1-txt-L4\" class=\"blob-num js-line-number js-blob-rnum\" data-line-number=\"4\"><\/td>\n<td id=\"file-gistfile1-txt-LC4\" class=\"blob-code blob-code-inner js-file-line\">        [string]$VMScaleSetName<\/td>\n<\/tr>\n<tr>\n<td id=\"file-gistfile1-txt-L5\" class=\"blob-num js-line-number js-blob-rnum\" data-line-number=\"5\"><\/td>\n<td id=\"file-gistfile1-txt-LC5\" class=\"blob-code blob-code-inner js-file-line\">    )<\/td>\n<\/tr>\n<tr>\n<td id=\"file-gistfile1-txt-L6\" class=\"blob-num js-line-number js-blob-rnum\" data-line-number=\"6\"><\/td>\n<td id=\"file-gistfile1-txt-LC6\" class=\"blob-code blob-code-inner js-file-line\">\n<\/td>\n<\/tr>\n<tr>\n<td id=\"file-gistfile1-txt-L7\" class=\"blob-num js-line-number js-blob-rnum\" data-line-number=\"7\"><\/td>\n<td id=\"file-gistfile1-txt-LC7\" class=\"blob-code blob-code-inner js-file-line\">    Write-Information &quot;Removing NAT pools with &#39;debugger&#39; in the name from VM scale set $VMScaleSetName&quot;<\/td>\n<\/tr>\n<tr>\n<td id=\"file-gistfile1-txt-L8\" class=\"blob-num js-line-number js-blob-rnum\" data-line-number=\"8\"><\/td>\n<td id=\"file-gistfile1-txt-LC8\" class=\"blob-code blob-code-inner js-file-line\">    $vmScaleSet = Get-AzureRmVmss -ResourceGroupName $ResourceGroupName -VMScaleSetName $VMScaleSetName<\/td>\n<\/tr>\n<tr>\n<td id=\"file-gistfile1-txt-L9\" class=\"blob-num js-line-number js-blob-rnum\" data-line-number=\"9\"><\/td>\n<td id=\"file-gistfile1-txt-LC9\" class=\"blob-code blob-code-inner js-file-line\">    $natPools = $vmScaleSet.VirtualMachineProfile.NetworkProfile.NetworkInterfaceConfigurations.ipConfigurations.LoadBalancerInboundNatPools<\/td>\n<\/tr>\n<tr>\n<td id=\"file-gistfile1-txt-L10\" class=\"blob-num js-line-number js-blob-rnum\" data-line-number=\"10\"><\/td>\n<td id=\"file-gistfile1-txt-LC10\" class=\"blob-code blob-code-inner js-file-line\">    $debugPools = $natPools | Where-Object { $_.Id -match &quot;Debugger&quot; }<\/td>\n<\/tr>\n<tr>\n<td id=\"file-gistfile1-txt-L11\" class=\"blob-num js-line-number js-blob-rnum\" data-line-number=\"11\"><\/td>\n<td id=\"file-gistfile1-txt-LC11\" class=\"blob-code blob-code-inner js-file-line\">    <\/td>\n<\/tr>\n<tr>\n<td id=\"file-gistfile1-txt-L12\" class=\"blob-num js-line-number js-blob-rnum\" data-line-number=\"12\"><\/td>\n<td id=\"file-gistfile1-txt-LC12\" class=\"blob-code blob-code-inner js-file-line\">    foreach ($debugPool in $debugPools)<\/td>\n<\/tr>\n<tr>\n<td id=\"file-gistfile1-txt-L13\" class=\"blob-num js-line-number js-blob-rnum\" data-line-number=\"13\"><\/td>\n<td id=\"file-gistfile1-txt-LC13\" class=\"blob-code blob-code-inner js-file-line\">    {<\/td>\n<\/tr>\n<tr>\n<td id=\"file-gistfile1-txt-L14\" class=\"blob-num js-line-number js-blob-rnum\" data-line-number=\"14\"><\/td>\n<td id=\"file-gistfile1-txt-LC14\" class=\"blob-code blob-code-inner js-file-line\">        $natPools.Remove($debugPool)<\/td>\n<\/tr>\n<tr>\n<td id=\"file-gistfile1-txt-L15\" class=\"blob-num js-line-number js-blob-rnum\" data-line-number=\"15\"><\/td>\n<td id=\"file-gistfile1-txt-LC15\" class=\"blob-code blob-code-inner js-file-line\">    }<\/td>\n<\/tr>\n<tr>\n<td id=\"file-gistfile1-txt-L16\" class=\"blob-num js-line-number js-blob-rnum\" data-line-number=\"16\"><\/td>\n<td id=\"file-gistfile1-txt-LC16\" class=\"blob-code blob-code-inner js-file-line\">    <\/td>\n<\/tr>\n<tr>\n<td id=\"file-gistfile1-txt-L17\" class=\"blob-num js-line-number js-blob-rnum\" data-line-number=\"17\"><\/td>\n<td id=\"file-gistfile1-txt-LC17\" class=\"blob-code blob-code-inner js-file-line\">    if ($debugPools.Count -lt 0)<\/td>\n<\/tr>\n<tr>\n<td id=\"file-gistfile1-txt-L18\" class=\"blob-num js-line-number js-blob-rnum\" data-line-number=\"18\"><\/td>\n<td id=\"file-gistfile1-txt-LC18\" class=\"blob-code blob-code-inner js-file-line\">    {<\/td>\n<\/tr>\n<tr>\n<td id=\"file-gistfile1-txt-L19\" class=\"blob-num js-line-number js-blob-rnum\" data-line-number=\"19\"><\/td>\n<td id=\"file-gistfile1-txt-LC19\" class=\"blob-code blob-code-inner js-file-line\">        Write-Information &quot;Updating $VMScaleSetName to save the changes&quot;<\/td>\n<\/tr>\n<tr>\n<td id=\"file-gistfile1-txt-L20\" class=\"blob-num js-line-number js-blob-rnum\" data-line-number=\"20\"><\/td>\n<td id=\"file-gistfile1-txt-LC20\" class=\"blob-code blob-code-inner js-file-line\">        Update-AzureRmVmss -ResourceGroupName $ResourceGroupName -VMScaleSetName $VMScaleSetName -VirtualMachineScaleSet $vmScaleSet<\/td>\n<\/tr>\n<tr>\n<td id=\"file-gistfile1-txt-L21\" class=\"blob-num js-line-number js-blob-rnum\" data-line-number=\"21\"><\/td>\n<td id=\"file-gistfile1-txt-LC21\" class=\"blob-code blob-code-inner js-file-line\">    } else<\/td>\n<\/tr>\n<tr>\n<td id=\"file-gistfile1-txt-L22\" class=\"blob-num js-line-number js-blob-rnum\" data-line-number=\"22\"><\/td>\n<td id=\"file-gistfile1-txt-LC22\" class=\"blob-code blob-code-inner js-file-line\">    {<\/td>\n<\/tr>\n<tr>\n<td id=\"file-gistfile1-txt-L23\" class=\"blob-num js-line-number js-blob-rnum\" data-line-number=\"23\"><\/td>\n<td id=\"file-gistfile1-txt-LC23\" class=\"blob-code blob-code-inner js-file-line\">        Write-Information &quot;Skipping updates on $VMScaleSetName, no debugger pools found.&quot;<\/td>\n<\/tr>\n<tr>\n<td id=\"file-gistfile1-txt-L24\" class=\"blob-num js-line-number js-blob-rnum\" data-line-number=\"24\"><\/td>\n<td id=\"file-gistfile1-txt-LC24\" class=\"blob-code blob-code-inner js-file-line\">    }    <\/td>\n<\/tr>\n<tr>\n<td id=\"file-gistfile1-txt-L25\" class=\"blob-num js-line-number js-blob-rnum\" data-line-number=\"25\"><\/td>\n<td id=\"file-gistfile1-txt-LC25\" class=\"blob-code blob-code-inner js-file-line\">}<\/td>\n<\/tr>\n<\/table><\/div>\n<\/div><\/div>\n<\/p><\/div>\n<\/div><\/div>\n<div class=\"gist-meta\">\n        <a href=\"https:\/\/gist.github.com\/jsiegmund\/f904f29e32f7f262b291a1bd961a4d86\/raw\/f9e6cad5857fde8740bf5a7fa2645db4498fec5e\/gistfile1.txt\" style=\"float:right\" class=\"Link--inTextBlock\">view raw<\/a><br \/>\n        <a href=\"https:\/\/gist.github.com\/jsiegmund\/f904f29e32f7f262b291a1bd961a4d86#file-gistfile1-txt\" class=\"Link--inTextBlock\"><br \/>\n          gistfile1.txt<br \/>\n        <\/a><br \/>\n        hosted with &#10084; by <a class=\"Link--inTextBlock\" href=\"https:\/\/github.com\">GitHub<\/a>\n      <\/div>\n<\/p><\/div>\n<\/div>\n<h3>Remove-LoadBalancerDebuggerNatPools<\/h3>\n<style>.gist table { margin-bottom: 0; }<\/style>\n<div style=\"tab-size: 8\" id=\"gist90968265\" class=\"gist\">\n<div class=\"gist-file\" translate=\"no\" data-color-mode=\"light\" data-light-theme=\"light\">\n<div class=\"gist-data\">\n<div class=\"js-gist-file-update-container js-task-list-container\">\n<div id=\"file-gistfile1-txt\" class=\"file my-2\">\n<div itemprop=\"text\"\n      class=\"Box-body p-0 blob-wrapper data type-text  \"\n      style=\"overflow: auto\" tabindex=\"0\" role=\"region\"\n      aria-label=\"gistfile1.txt content, created by jsiegmund on 09:44AM on July 26, 2018.\"\n    ><\/p>\n<div class=\"js-check-hidden-unicode js-blob-code-container blob-code-content\">\n<p>  <template class=\"js-file-alert-template\"><\/p>\n<div data-view-component=\"true\" class=\"flash flash-warn flash-full d-flex flex-items-center\">\n  <svg aria-hidden=\"true\" height=\"16\" viewBox=\"0 0 16 16\" version=\"1.1\" width=\"16\" data-view-component=\"true\" class=\"octicon octicon-alert\">\n    <path d=\"M6.457 1.047c.659-1.234 2.427-1.234 3.086 0l6.082 11.378A1.75 1.75 0 0 1 14.082 15H1.918a1.75 1.75 0 0 1-1.543-2.575Zm1.763.707a.25.25 0 0 0-.44 0L1.698 13.132a.25.25 0 0 0 .22.368h12.164a.25.25 0 0 0 .22-.368Zm.53 3.996v2.5a.75.75 0 0 1-1.5 0v-2.5a.75.75 0 0 1 1.5 0ZM9 11a1 1 0 1 1-2 0 1 1 0 0 1 2 0Z\"><\/path>\n<\/svg><br \/>\n    <span><br \/>\n      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.<br \/>\n      <a class=\"Link--inTextBlock\" href=\"https:\/\/github.co\/hiddenchars\" target=\"_blank\">Learn more about bidirectional Unicode characters<\/a><br \/>\n    <\/span><\/p>\n<div data-view-component=\"true\" class=\"flash-action\">        <a href=\"{{ revealButtonHref }}\" data-view-component=\"true\" class=\"btn-sm btn\">    Show hidden characters<br \/>\n<\/a>\n<\/div>\n<\/div>\n<p><\/template><br \/>\n<template class=\"js-line-alert-template\"><br \/>\n  <span aria-label=\"This line has hidden Unicode characters\" data-view-component=\"true\" class=\"line-alert tooltipped tooltipped-e\"><br \/>\n    <svg aria-hidden=\"true\" height=\"16\" viewBox=\"0 0 16 16\" version=\"1.1\" width=\"16\" data-view-component=\"true\" class=\"octicon octicon-alert\">\n    <path d=\"M6.457 1.047c.659-1.234 2.427-1.234 3.086 0l6.082 11.378A1.75 1.75 0 0 1 14.082 15H1.918a1.75 1.75 0 0 1-1.543-2.575Zm1.763.707a.25.25 0 0 0-.44 0L1.698 13.132a.25.25 0 0 0 .22.368h12.164a.25.25 0 0 0 .22-.368Zm.53 3.996v2.5a.75.75 0 0 1-1.5 0v-2.5a.75.75 0 0 1 1.5 0ZM9 11a1 1 0 1 1-2 0 1 1 0 0 1 2 0Z\"><\/path>\n<\/svg><br \/>\n<\/span><\/template><\/p>\n<div class=\"table\"><table data-hpc class=\"highlight tab-size js-file-line-container\" data-tab-size=\"4\" data-paste-markdown-skip data-tagsearch-path=\"gistfile1.txt\">\n<tr>\n<td id=\"file-gistfile1-txt-L1\" class=\"blob-num js-line-number js-blob-rnum\" data-line-number=\"1\"><\/td>\n<td id=\"file-gistfile1-txt-LC1\" class=\"blob-code blob-code-inner js-file-line\">function Remove-LoadBalancerDebuggerNatPools<\/td>\n<\/tr>\n<tr>\n<td id=\"file-gistfile1-txt-L2\" class=\"blob-num js-line-number js-blob-rnum\" data-line-number=\"2\"><\/td>\n<td id=\"file-gistfile1-txt-LC2\" class=\"blob-code blob-code-inner js-file-line\">{<\/td>\n<\/tr>\n<tr>\n<td id=\"file-gistfile1-txt-L3\" class=\"blob-num js-line-number js-blob-rnum\" data-line-number=\"3\"><\/td>\n<td id=\"file-gistfile1-txt-LC3\" class=\"blob-code blob-code-inner js-file-line\">    param(<\/td>\n<\/tr>\n<tr>\n<td id=\"file-gistfile1-txt-L4\" class=\"blob-num js-line-number js-blob-rnum\" data-line-number=\"4\"><\/td>\n<td id=\"file-gistfile1-txt-LC4\" class=\"blob-code blob-code-inner js-file-line\">        [string]$ResourceGroupName,<\/td>\n<\/tr>\n<tr>\n<td id=\"file-gistfile1-txt-L5\" class=\"blob-num js-line-number js-blob-rnum\" data-line-number=\"5\"><\/td>\n<td id=\"file-gistfile1-txt-LC5\" class=\"blob-code blob-code-inner js-file-line\">        [string]$LoadBalancerName<\/td>\n<\/tr>\n<tr>\n<td id=\"file-gistfile1-txt-L6\" class=\"blob-num js-line-number js-blob-rnum\" data-line-number=\"6\"><\/td>\n<td id=\"file-gistfile1-txt-LC6\" class=\"blob-code blob-code-inner js-file-line\">    )<\/td>\n<\/tr>\n<tr>\n<td id=\"file-gistfile1-txt-L7\" class=\"blob-num js-line-number js-blob-rnum\" data-line-number=\"7\"><\/td>\n<td id=\"file-gistfile1-txt-LC7\" class=\"blob-code blob-code-inner js-file-line\">\n<\/td>\n<\/tr>\n<tr>\n<td id=\"file-gistfile1-txt-L8\" class=\"blob-num js-line-number js-blob-rnum\" data-line-number=\"8\"><\/td>\n<td id=\"file-gistfile1-txt-LC8\" class=\"blob-code blob-code-inner js-file-line\">    Write-Information &quot;Removing NAT pools with &#39;debugger&#39; in the name from load balancer $LoadBalancerName&quot;<\/td>\n<\/tr>\n<tr>\n<td id=\"file-gistfile1-txt-L9\" class=\"blob-num js-line-number js-blob-rnum\" data-line-number=\"9\"><\/td>\n<td id=\"file-gistfile1-txt-LC9\" class=\"blob-code blob-code-inner js-file-line\">    $loadBalancer = Get-AzureRmLoadBalancer -Name $LoadBalancerName -ResourceGroupName $resourceGroupName<\/td>\n<\/tr>\n<tr>\n<td id=\"file-gistfile1-txt-L10\" class=\"blob-num js-line-number js-blob-rnum\" data-line-number=\"10\"><\/td>\n<td id=\"file-gistfile1-txt-LC10\" class=\"blob-code blob-code-inner js-file-line\">    $pools = $loadBalancer.InboundNatPools | Where-Object { $_.Name -match &quot;debugger&quot; }<\/td>\n<\/tr>\n<tr>\n<td id=\"file-gistfile1-txt-L11\" class=\"blob-num js-line-number js-blob-rnum\" data-line-number=\"11\"><\/td>\n<td id=\"file-gistfile1-txt-LC11\" class=\"blob-code blob-code-inner js-file-line\">    foreach ($pool in $pools) {<\/td>\n<\/tr>\n<tr>\n<td id=\"file-gistfile1-txt-L12\" class=\"blob-num js-line-number js-blob-rnum\" data-line-number=\"12\"><\/td>\n<td id=\"file-gistfile1-txt-LC12\" class=\"blob-code blob-code-inner js-file-line\">        $loadBalancer.InboundNatPools.Remove($pool)<\/td>\n<\/tr>\n<tr>\n<td id=\"file-gistfile1-txt-L13\" class=\"blob-num js-line-number js-blob-rnum\" data-line-number=\"13\"><\/td>\n<td id=\"file-gistfile1-txt-LC13\" class=\"blob-code blob-code-inner js-file-line\">    }<\/td>\n<\/tr>\n<tr>\n<td id=\"file-gistfile1-txt-L14\" class=\"blob-num js-line-number js-blob-rnum\" data-line-number=\"14\"><\/td>\n<td id=\"file-gistfile1-txt-LC14\" class=\"blob-code blob-code-inner js-file-line\">\n<\/td>\n<\/tr>\n<tr>\n<td id=\"file-gistfile1-txt-L15\" class=\"blob-num js-line-number js-blob-rnum\" data-line-number=\"15\"><\/td>\n<td id=\"file-gistfile1-txt-LC15\" class=\"blob-code blob-code-inner js-file-line\">    if ($pools.Count -lt 0)<\/td>\n<\/tr>\n<tr>\n<td id=\"file-gistfile1-txt-L16\" class=\"blob-num js-line-number js-blob-rnum\" data-line-number=\"16\"><\/td>\n<td id=\"file-gistfile1-txt-LC16\" class=\"blob-code blob-code-inner js-file-line\">    {<\/td>\n<\/tr>\n<tr>\n<td id=\"file-gistfile1-txt-L17\" class=\"blob-num js-line-number js-blob-rnum\" data-line-number=\"17\"><\/td>\n<td id=\"file-gistfile1-txt-LC17\" class=\"blob-code blob-code-inner js-file-line\">        Write-Information &quot;Updating $LoadBalancerName to save the changes&quot;<\/td>\n<\/tr>\n<tr>\n<td id=\"file-gistfile1-txt-L18\" class=\"blob-num js-line-number js-blob-rnum\" data-line-number=\"18\"><\/td>\n<td id=\"file-gistfile1-txt-LC18\" class=\"blob-code blob-code-inner js-file-line\">        Set-AzureRmLoadBalancer -LoadBalancer $loadBalancer<\/td>\n<\/tr>\n<tr>\n<td id=\"file-gistfile1-txt-L19\" class=\"blob-num js-line-number js-blob-rnum\" data-line-number=\"19\"><\/td>\n<td id=\"file-gistfile1-txt-LC19\" class=\"blob-code blob-code-inner js-file-line\">    }<\/td>\n<\/tr>\n<tr>\n<td id=\"file-gistfile1-txt-L20\" class=\"blob-num js-line-number js-blob-rnum\" data-line-number=\"20\"><\/td>\n<td id=\"file-gistfile1-txt-LC20\" class=\"blob-code blob-code-inner js-file-line\">    else {<\/td>\n<\/tr>\n<tr>\n<td id=\"file-gistfile1-txt-L21\" class=\"blob-num js-line-number js-blob-rnum\" data-line-number=\"21\"><\/td>\n<td id=\"file-gistfile1-txt-LC21\" class=\"blob-code blob-code-inner js-file-line\">        Write-Information &quot;Skipping updates on $LoadBalancerName, no debugger pools found.&quot;<\/td>\n<\/tr>\n<tr>\n<td id=\"file-gistfile1-txt-L22\" class=\"blob-num js-line-number js-blob-rnum\" data-line-number=\"22\"><\/td>\n<td id=\"file-gistfile1-txt-LC22\" class=\"blob-code blob-code-inner js-file-line\">    }    <\/td>\n<\/tr>\n<tr>\n<td id=\"file-gistfile1-txt-L23\" class=\"blob-num js-line-number js-blob-rnum\" data-line-number=\"23\"><\/td>\n<td id=\"file-gistfile1-txt-LC23\" class=\"blob-code blob-code-inner js-file-line\">}<\/td>\n<\/tr>\n<\/table><\/div>\n<\/div><\/div>\n<\/p><\/div>\n<\/div><\/div>\n<div class=\"gist-meta\">\n        <a href=\"https:\/\/gist.github.com\/jsiegmund\/b64c128062eb46d0e6b39a41bc500052\/raw\/f2fe89fa3daf8b59d7d4f81e8b8f8fd3980626a4\/gistfile1.txt\" style=\"float:right\" class=\"Link--inTextBlock\">view raw<\/a><br \/>\n        <a href=\"https:\/\/gist.github.com\/jsiegmund\/b64c128062eb46d0e6b39a41bc500052#file-gistfile1-txt\" class=\"Link--inTextBlock\"><br \/>\n          gistfile1.txt<br \/>\n        <\/a><br \/>\n        hosted with &#10084; by <a class=\"Link--inTextBlock\" href=\"https:\/\/github.com\">GitHub<\/a>\n      <\/div>\n<\/p><\/div>\n<\/div>\n","protected":false},"excerpt":{"rendered":"<p>Sometimes your project forces you to do something you rather wouldn&#8217;t: debug in staging or production. Although you should definitely try to avoid these situations, sometimes sh*t just happens and that&#8217;s fine. If your project is running on Service Fabric, Azure offers you the option to attach a debugger right from within Visual Studio. This<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"jetpack_post_was_ever_published":false,"_jetpack_newsletter_access":"","jetpack_publicize_message":"","jetpack_is_tweetstorm":false,"jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":false,"jetpack_social_options":{"image_generator_settings":{"template":"highway","enabled":false}}},"categories":[34],"tags":[78,201,203],"jetpack_publicize_connections":[],"jetpack_featured_media_url":"","jetpack_shortlink":"https:\/\/wp.me\/p3KFR1-DS","_links":{"self":[{"href":"http:\/\/blog.repsaj.nl\/index.php\/wp-json\/wp\/v2\/posts\/2472"}],"collection":[{"href":"http:\/\/blog.repsaj.nl\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/blog.repsaj.nl\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/blog.repsaj.nl\/index.php\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"http:\/\/blog.repsaj.nl\/index.php\/wp-json\/wp\/v2\/comments?post=2472"}],"version-history":[{"count":0,"href":"http:\/\/blog.repsaj.nl\/index.php\/wp-json\/wp\/v2\/posts\/2472\/revisions"}],"wp:attachment":[{"href":"http:\/\/blog.repsaj.nl\/index.php\/wp-json\/wp\/v2\/media?parent=2472"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/blog.repsaj.nl\/index.php\/wp-json\/wp\/v2\/categories?post=2472"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/blog.repsaj.nl\/index.php\/wp-json\/wp\/v2\/tags?post=2472"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}