<?xml version="1.0" encoding="utf-8"?>
<rss xmlns:atom="https://www.w3.org/2005/Atom" xmlns:sy="https://purl.org/rss/1.0/modules/syndication/" xmlns:dc="https://purl.org/dc/elements/1.1/" xmlns:content="https://purl.org/rss/1.0/modules/content/" xmlns:wfw="https://wellformedweb.org/CommentAPI/" xmlns:slash="https://purl.org/rss/1.0/modules/slash/"
  version="2.0">
  <channel>
    <title>AzureFoundation: Cloud Computing Patterns</title>
    <atom:link
      href="https://docs.microsoft.com/archive/blogs/azurefoundation/feed.xml"
      rel="self"
      type="application/rss+xml" />
    <link>https://docs.microsoft.com/archive/blogs/azurefoundation/feed.xml</link>
    <description>Business Performance Excellence</description>
    <lastBuildDate>Wed, 17 Apr 2019 03:19:08 GMT</lastBuildDate>
    <language>en-US</language>
    <sy:updatePeriod>hourly</sy:updatePeriod>
    <sy:updateFrequency>1</sy:updateFrequency>
    <item>
      <title>CredSSP Prevents Remote Desktop Connection</title>
      <link>https://docs.microsoft.com/archive/blogs/azurefoundation/credssp-prevents-remote-desktop-connection</link>
      <pubDate>Thu, 10 May 2018 17:02:04 GMT</pubDate>
      <dc:creator><![CDATA[Will IV]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/azurefoundation/?p=195</guid>
      <description><![CDATA[Hello,

I have a lab environment that I try to keep a working version of the AzureFondation and...]]></description>
      <content:encoded><![CDATA[Hello,

I have a lab environment that I try to keep a working version of the AzureFondation and recently I havent' been able to log into the domain controllers that handle my AAD Connect servers.

The error message:  "An Authentication error has occurred.  The function requested is not supported Remote computer: w2padds1a.slg044.us This could be due to CredSSP encryption oracle remediation. For more information, see https://go.microsoft.com/fwling/?linked=866660"

<a href="https://support.microsoft.com/en-us/help/4093492/credssp-updates-for-cve-2018-0886-march-13-2018">https://support.microsoft.com/en-us/help/4093492/credssp-updates-for-cve-2018-0886-march-13-2018</a>

This is where I find out that my VMs are not auto updating.  I know, this isn't the best way to build VMs that don't automatically update, but I was in a hurry when I deployed the lab.

The issue:  If I can't RDP to the server how can I run System Update?

The solution:

From a patched RDP server with network connectivity to your Azure server's that need to get this patch applied,
<ol>
 	<li>Get <a href="https://docs.microsoft.com/en-us/sysinternals/downloads/psexec">PSEXEC.exe</a></li>
 	<li>Get the PowerShell Script, <a href="https://gallery.technet.microsoft.com/scriptcenter/Execute-Windows-Update-fc6acb16">PS_WinUpdate</a> to update the VM.</li>
 	<li>Open a CMD prompt in Admin Mode</li>
 	<li>Run the following command:  psexec.exe -s \\w1padds1a cmd (this will open a remote command prompt on the RDS session)</li>
 	<li>Now that you have a remote session, run the powershell script:  powershell.exe c:\users\willstgov\documents\ps_winupdate.ps1 (I was able to get a mapped drive to the server and copy the script to the remote computer)</li>
</ol>
&nbsp;

This poor server needed to update a lot of things so it is still running :)

Next steps will be to have an automation account running that updates the VMs the way they should be.

&nbsp;

Will.

&nbsp;

&nbsp;

&nbsp;

&nbsp;]]></content:encoded>
    </item>
    <item>
      <title>Move a VM's Primary NIC from one VNET to another.</title>
      <link>https://docs.microsoft.com/archive/blogs/azurefoundation/move-a-vms-primary-nic-from-one-vnet-to-another</link>
      <pubDate>Thu, 18 Jan 2018 16:13:57 GMT</pubDate>
      <dc:creator><![CDATA[Will IV]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/azurefoundation/?p=105</guid>
      <description><![CDATA[There is currently a limitation in Azure VMs that will not allow a NIC to be moved to a different...]]></description>
      <content:encoded><![CDATA[There is currently a limitation in Azure VMs that will not allow a NIC to be moved to a different VNET.  The ability for an Azure contributor to modify their cloud, just like they would modify their on premise datacenter is critical.  One of the common requirements on premise is the VLAN change request.

The AzureFoundation, <a href="https://aka.ms/azure/foundation">https://aka.ms/azure/foundation</a>, is my repository, and you will find in the ARM directory structure there are specific patterns that will deploy an enterprise pattern.  Often things get deployed that don't follow the enterprise pattern and have to be moved into it.

In this example, the powershell is hosted in the ARM/Compute/Utilities folder, with the name ModifyMVVNET.ps1.

My approach was to apply the VNET migration to an entire subscription, where you can go through all the VMs and individually assign the VM a new network.  This was a horrible way to test my script, basically had to manually fix all the VMs manually.  After testing this out, I can see how you may prefer to apply the utility VM by VM, to compromise, I limited the scope to a ResourceGroup.

Details for the PowerShell.
<ol>
 	<li>Login.  Note the $Environment variable, as my customers often are using the Government Cloud<span style="color: #0000ff"><span style="font-family: Lucida Console;font-size: xx-small">Login-AzureRmAccount</span><span style="font-family: Lucida Console;font-size: xx-small"> </span><span style="font-family: Lucida Console;font-size: xx-small">-Environment</span><span style="font-family: Lucida Console;font-size: xx-small"> </span></span><span style="color: #ff4500;font-family: Lucida Console;font-size: xx-small"><span style="color: #0000ff">$Environment</span> </span></li>
 	<li>Focus on a Subscription.  One of my friends told me about the Out-GridView option!<span style="color: #0000ff"><span style="font-family: Lucida Console;font-size: xx-small">$subscription</span><span style="font-family: Lucida Console;font-size: xx-small"> </span><span style="font-family: Lucida Console;font-size: xx-small">=</span><span style="font-family: Lucida Console;font-size: xx-small"> </span><span style="font-family: Lucida Console;font-size: xx-small">Get-AzureRmSubscription</span><span style="font-family: Lucida Console;font-size: xx-small"> </span><span style="font-family: Lucida Console;font-size: xx-small">|</span><span style="font-family: Lucida Console;font-size: xx-small"> </span><span style="font-family: Lucida Console;font-size: xx-small">Out-GridView</span><span style="font-family: Lucida Console;font-size: xx-small"> </span></span><span style="color: #ffe4b5;font-family: Lucida Console;font-size: xx-small"><span style="color: #0000ff">-PassThru</span></span></li>
 	<li>Focus on a ResourceGroup.<span style="color: #0000ff"><span style="font-family: Lucida Console;font-size: xx-small">$ResouceGroup</span><span style="font-family: Lucida Console;font-size: xx-small"> </span><span style="font-family: Lucida Console;font-size: xx-small">=</span><span style="font-family: Lucida Console;font-size: xx-small"> </span><span style="font-family: Lucida Console;font-size: xx-small">Get-AzureRMResourceGroup</span><span style="font-family: Lucida Console;font-size: xx-small"> </span><span style="font-family: Lucida Console;font-size: xx-small">|</span><span style="font-family: Lucida Console;font-size: xx-small"> </span><span style="font-family: Lucida Console;font-size: xx-small">Out-GridView</span><span style="font-family: Lucida Console;font-size: xx-small"> </span></span><span style="color: #ffe4b5;font-family: Lucida Console;font-size: xx-small"><span style="color: #0000ff">-PassThru</span> </span></li>
 	<li>Get the VMs in the ResourceGroup<span style="color: #0000ff"><span style="font-family: Lucida Console;font-size: xx-small">$VMs</span><span style="font-family: Lucida Console;font-size: xx-small">=</span><span style="font-family: Lucida Console;font-size: xx-small"> </span><span style="font-family: Lucida Console;font-size: xx-small">Get-AzureRMVM</span><span style="font-family: Lucida Console;font-size: xx-small"> </span><span style="font-family: Lucida Console;font-size: xx-small">-ResourceGroupName</span><span style="font-family: Lucida Console;font-size: xx-small"> </span><span style="font-family: Lucida Console;font-size: xx-small">$ResouceGroup</span><span style="font-family: Lucida Console;font-size: xx-small">.</span></span><span style="color: #f5f5f5;font-family: Lucida Console;font-size: xx-small"><span style="color: #0000ff">ResourceGroupName</span> </span></li>
 	<li>Cycle through the VM and help the user select the To-Be VNET and Subnet, as well as the Static IP address.
<ul>
 	<li>Select the new Network, hopefully knowing the current network information will help guide what network to choose.<span style="font-family: Lucida Console;font-size: xx-small"> </span><span style="color: #0000ff"><span style="font-family: Lucida Console;font-size: xx-small">$NewNetwork</span><span style="font-family: Lucida Console;font-size: xx-small"> </span><span style="font-family: Lucida Console;font-size: xx-small">=</span><span style="font-family: Lucida Console;font-size: xx-small"> </span><span style="font-family: Lucida Console;font-size: xx-small">Get-AzureRmVirtualNetwork</span><span style="font-family: Lucida Console;font-size: xx-small"> </span><span style="font-family: Lucida Console;font-size: xx-small">|</span><span style="font-family: Lucida Console;font-size: xx-small">Select-Object</span><span style="font-family: Lucida Console;font-size: xx-small"> </span><span style="font-family: Lucida Console;font-size: xx-small">-property</span><span style="font-family: Lucida Console;font-size: xx-small"> </span><span style="font-family: Lucida Console;font-size: xx-small">Name</span><span style="font-family: Lucida Console;font-size: xx-small">,</span><span style="font-family: Lucida Console;font-size: xx-small">Location</span><span style="font-family: Lucida Console;font-size: xx-small">,</span><span style="font-family: Lucida Console;font-size: xx-small">ResourceGroupName</span><span style="font-family: Lucida Console;font-size: xx-small">,</span><span style="font-family: Lucida Console;font-size: xx-small">AddressSpacetext</span><span style="font-family: Lucida Console;font-size: xx-small"> </span><span style="font-family: Lucida Console;font-size: xx-small">|</span><span style="font-family: Lucida Console;font-size: xx-small"> </span><span style="font-family: Lucida Console;font-size: xx-small">Out-GridView</span><span style="font-family: Lucida Console;font-size: xx-small"> </span><span style="font-family: Lucida Console;font-size: xx-small">-passthru</span></span><span style="color: #0000ff"><span style="font-family: Lucida Console;font-size: xx-small"> </span><span style="font-family: Lucida Console;font-size: xx-small"></span></span><span style="color: #0000ff"><span style="font-family: Lucida Console;font-size: xx-small"> </span><span style="font-family: Lucida Console;font-size: xx-small">$NewNetwork</span><span style="font-family: Lucida Console;font-size: xx-small"> </span><span style="font-family: Lucida Console;font-size: xx-small">=</span><span style="font-family: Lucida Console;font-size: xx-small"> </span><span style="font-family: Lucida Console;font-size: xx-small">Get-AzureRmVirtualNetwork</span><span style="font-family: Lucida Console;font-size: xx-small"> </span><span style="font-family: Lucida Console;font-size: xx-small">-Name</span><span style="font-family: Lucida Console;font-size: xx-small"> </span><span style="font-family: Lucida Console;font-size: xx-small">$NewNetwork</span><span style="font-family: Lucida Console;font-size: xx-small">.</span><span style="font-family: Lucida Console;font-size: xx-small">Name</span><span style="font-family: Lucida Console;font-size: xx-small"> </span><span style="font-family: Lucida Console;font-size: xx-small">-ResourceGroupName</span><span style="font-family: Lucida Console;font-size: xx-small"> </span><span style="font-family: Lucida Console;font-size: xx-small">$NewNetwork</span><span style="font-family: Lucida Console;font-size: xx-small">.</span><span style="font-family: Lucida Console;font-size: xx-small">ResourceGroupName</span></span></li>
 	<li>Select the new Subnet<span style="font-family: Lucida Console;font-size: xx-small"> </span><span style="color: #0000ff"><span style="font-family: Lucida Console;font-size: xx-small">$NewSubnet</span><span style="font-family: Lucida Console;font-size: xx-small"> </span><span style="font-family: Lucida Console;font-size: xx-small">=</span><span style="font-family: Lucida Console;font-size: xx-small"> </span><span style="font-family: Lucida Console;font-size: xx-small">Get-AzureRmVirtualNetworkSubnetConfig</span><span style="font-family: Lucida Console;font-size: xx-small"> </span><span style="font-family: Lucida Console;font-size: xx-small">-VirtualNetwork</span><span style="font-family: Lucida Console;font-size: xx-small"> </span><span style="font-family: Lucida Console;font-size: xx-small">$NewNetwork</span><span style="font-family: Lucida Console;font-size: xx-small"> </span><span style="font-family: Lucida Console;font-size: xx-small">|</span><span style="font-family: Lucida Console;font-size: xx-small"> </span><span style="font-family: Lucida Console;font-size: xx-small">Select-Object</span><span style="font-family: Lucida Console;font-size: xx-small"> </span><span style="font-family: Lucida Console;font-size: xx-small">-Property</span><span style="font-family: Lucida Console;font-size: xx-small"> </span><span style="font-family: Lucida Console;font-size: xx-small">Name</span><span style="font-family: Lucida Console;font-size: xx-small">,</span><span style="font-family: Lucida Console;font-size: xx-small">AddressPrefix</span><span style="font-family: Lucida Console;font-size: xx-small"> </span><span style="font-family: Lucida Console;font-size: xx-small">|</span><span style="font-family: Lucida Console;font-size: xx-small">Out-GridView</span><span style="font-family: Lucida Console;font-size: xx-small"> </span><span style="font-family: Lucida Console;font-size: xx-small">-PassThru</span><span style="font-family: Lucida Console;font-size: xx-small"> </span><span style="font-family: Lucida Console;font-size: xx-small">-Title</span><span style="font-family: Lucida Console;font-size: xx-small"> </span><span style="font-family: Lucida Console;font-size: xx-small">$Title</span></span><span style="color: #0000ff"><span style="font-family: Lucida Console;font-size: xx-small"> </span><span style="font-family: Lucida Console;font-size: xx-small"></span></span><span style="color: #0000ff"><span style="font-family: Lucida Console;font-size: xx-small"> </span><span style="font-family: Lucida Console;font-size: xx-small">$NewSubnet</span><span style="font-family: Lucida Console;font-size: xx-small"> </span><span style="font-family: Lucida Console;font-size: xx-small">=</span><span style="font-family: Lucida Console;font-size: xx-small"> </span><span style="font-family: Lucida Console;font-size: xx-small">Get-AzureRmVirtualNetworkSubnetConfig</span><span style="font-family: Lucida Console;font-size: xx-small"> </span><span style="font-family: Lucida Console;font-size: xx-small">-VirtualNetwork</span><span style="font-family: Lucida Console;font-size: xx-small"> </span><span style="font-family: Lucida Console;font-size: xx-small">$NewNetwork</span><span style="font-family: Lucida Console;font-size: xx-small"> </span><span style="font-family: Lucida Console;font-size: xx-small">-Name</span><span style="font-family: Lucida Console;font-size: xx-small"> </span><span style="font-family: Lucida Console;font-size: xx-small">$NewSubnet</span><span style="font-family: Lucida Console;font-size: xx-small">.</span></span><span style="color: #f5f5f5;font-family: Lucida Console;font-size: xx-small"><span style="color: #0000ff">Name</span> </span></li>
 	<li>Set the Private IP address variable<span style="font-family: Lucida Console;font-size: xx-small"> </span><span style="color: #0000ff"><span style="font-family: Lucida Console;font-size: xx-small">$message</span><span style="font-family: Lucida Console;font-size: xx-small"> </span><span style="font-family: Lucida Console;font-size: xx-small">=</span><span style="font-family: Lucida Console;font-size: xx-small"> </span><span style="font-family: Lucida Console;font-size: xx-small">"current name: "</span><span style="font-family: Lucida Console;font-size: xx-small"> </span><span style="font-family: Lucida Console;font-size: xx-small">+</span><span style="font-family: Lucida Console;font-size: xx-small"> </span><span style="font-family: Lucida Console;font-size: xx-small">$vm</span><span style="font-family: Lucida Console;font-size: xx-small">.</span><span style="font-family: Lucida Console;font-size: xx-small">name</span><span style="font-family: Lucida Console;font-size: xx-small"> </span><span style="font-family: Lucida Console;font-size: xx-small">+</span><span style="font-family: Lucida Console;font-size: xx-small"> </span><span style="font-family: Lucida Console;font-size: xx-small">", Current IP: "</span><span style="font-family: Lucida Console;font-size: xx-small"> </span><span style="font-family: Lucida Console;font-size: xx-small">+</span><span style="font-family: Lucida Console;font-size: xx-small">$NIC</span><span style="font-family: Lucida Console;font-size: xx-small">[</span><span style="font-family: Lucida Console;font-size: xx-small">0</span><span style="font-family: Lucida Console;font-size: xx-small">].</span><span style="font-family: Lucida Console;font-size: xx-small">IpConfigurations</span><span style="font-family: Lucida Console;font-size: xx-small">.</span><span style="font-family: Lucida Console;font-size: xx-small">privateIPAddress</span><span style="font-family: Lucida Console;font-size: xx-small">+</span><span style="font-family: Lucida Console;font-size: xx-small"> </span><span style="font-family: Lucida Console;font-size: xx-small">", New IP must be in this prefex: "</span><span style="font-family: Lucida Console;font-size: xx-small"> </span><span style="font-family: Lucida Console;font-size: xx-small">+</span><span style="font-family: Lucida Console;font-size: xx-small"> </span><span style="font-family: Lucida Console;font-size: xx-small">$NewSubnet</span><span style="font-family: Lucida Console;font-size: xx-small">.</span><span style="font-family: Lucida Console;font-size: xx-small">AddressPrefix</span></span><span style="color: #0000ff"><span style="font-family: Lucida Console;font-size: xx-small"> </span><span style="font-family: Lucida Console;font-size: xx-small"></span></span><span style="color: #0000ff"><span style="font-family: Lucida Console;font-size: xx-small"> </span><span style="font-family: Lucida Console;font-size: xx-small">$NewPrivateIP</span><span style="font-family: Lucida Console;font-size: xx-small"> </span><span style="font-family: Lucida Console;font-size: xx-small">=</span><span style="font-family: Lucida Console;font-size: xx-small"> </span><span style="font-family: Lucida Console;font-size: xx-small">Read-Host</span><span style="font-family: Lucida Console;font-size: xx-small"> </span><span style="font-family: Lucida Console;font-size: xx-small">$message</span></span></li>
 	<li>Start a new IPConfiguration object<span style="font-family: Lucida Console;font-size: xx-small"> </span><span style="color: #0000ff"><span style="font-family: Lucida Console;font-size: xx-small">$NewIPConfig</span><span style="font-family: Lucida Console;font-size: xx-small"> </span><span style="font-family: Lucida Console;font-size: xx-small">=</span><span style="font-family: Lucida Console;font-size: xx-small"> </span><span style="font-family: Lucida Console;font-size: xx-small">New-AzureRmNetworkInterfaceIpConfig</span><span style="font-family: Lucida Console;font-size: xx-small"> </span><span style="font-family: Lucida Console;font-size: xx-small">-Subnet</span><span style="font-family: Lucida Console;font-size: xx-small"> </span><span style="font-family: Lucida Console;font-size: xx-small">$NewSubnet</span><span style="font-family: Lucida Console;font-size: xx-small"> </span><span style="font-family: Lucida Console;font-size: xx-small">-Name</span><span style="font-family: Lucida Console;font-size: xx-small"> </span><span style="font-family: Lucida Console;font-size: xx-small">'config1'</span><span style="font-family: Lucida Console;font-size: xx-small"> </span><span style="font-family: Lucida Console;font-size: xx-small">-Primary</span><span style="font-family: Lucida Console;font-size: xx-small"> </span><span style="font-family: Lucida Console;font-size: xx-small">-PrivateIpAddress</span><span style="font-family: Lucida Console;font-size: xx-small"> </span><span style="font-family: Lucida Console;font-size: xx-small">$NewPrivateIP</span></span></li>
 	<li>Start a new NIC object<span style="font-family: Lucida Console;font-size: xx-small"> </span><span style="color: #0000ff"><span style="font-family: Lucida Console;font-size: xx-small">$NewNic</span><span style="font-family: Lucida Console;font-size: xx-small"> </span><span style="font-family: Lucida Console;font-size: xx-small">=</span><span style="font-family: Lucida Console;font-size: xx-small"> </span><span style="font-family: Lucida Console;font-size: xx-small">New-AzureRmNetworkInterface</span><span style="font-family: Lucida Console;font-size: xx-small"> </span><span style="font-family: Lucida Console;font-size: xx-small">-Name</span><span style="font-family: Lucida Console;font-size: xx-small"> </span><span style="font-family: Lucida Console;font-size: xx-small">"</span><span style="font-family: Lucida Console;font-size: xx-small">$(</span><span style="font-family: Lucida Console;font-size: xx-small">$NicName</span><span style="font-family: Lucida Console;font-size: xx-small">)</span><span style="font-family: Lucida Console;font-size: xx-small">1a"</span><span style="font-family: Lucida Console;font-size: xx-small"> </span><span style="font-family: Lucida Console;font-size: xx-small">-ResourceGroupName</span><span style="font-family: Lucida Console;font-size: xx-small"> </span><span style="font-family: Lucida Console;font-size: xx-small">$Nic</span><span style="font-family: Lucida Console;font-size: xx-small">.</span><span style="font-family: Lucida Console;font-size: xx-small">ResourceGroupName</span><span style="font-family: Lucida Console;font-size: xx-small"> </span><span style="font-family: Lucida Console;font-size: xx-small">-Location</span><span style="font-family: Lucida Console;font-size: xx-small"> </span><span style="font-family: Lucida Console;font-size: xx-small">$Nic</span><span style="font-family: Lucida Console;font-size: xx-small">.</span><span style="font-family: Lucida Console;font-size: xx-small">Location</span><span style="font-family: Lucida Console;font-size: xx-small"> </span><span style="font-family: Lucida Console;font-size: xx-small">-IpConfiguration</span><span style="font-family: Lucida Console;font-size: xx-small"> </span><span style="font-family: Lucida Console;font-size: xx-small">$NewIPConfig</span><span style="font-family: Lucida Console;font-size: xx-small"> </span><span style="font-family: Lucida Console;font-size: xx-small">-Force</span></span></li>
 	<li>Since we are changing the Primary NIC, we need to remove the current NIC from the $VM.<span style="font-family: Lucida Console;font-size: xx-small"> </span><span style="color: #0000ff"><span style="font-family: Lucida Console;font-size: xx-small">$VM</span><span style="font-family: Lucida Console;font-size: xx-small"> </span><span style="font-family: Lucida Console;font-size: xx-small">=</span><span style="font-family: Lucida Console;font-size: xx-small"> </span><span style="font-family: Lucida Console;font-size: xx-small">Remove-AzureRmVMNetworkInterface</span><span style="font-family: Lucida Console;font-size: xx-small"> </span><span style="font-family: Lucida Console;font-size: xx-small">-VM</span><span style="font-family: Lucida Console;font-size: xx-small"> </span><span style="font-family: Lucida Console;font-size: xx-small">$VM</span><span style="font-family: Lucida Console;font-size: xx-small"> </span><span style="font-family: Lucida Console;font-size: xx-small">-NetworkInterfaceIDs</span><span style="font-family: Lucida Console;font-size: xx-small"> </span><span style="font-family: Lucida Console;font-size: xx-small">$Nic</span><span style="font-family: Lucida Console;font-size: xx-small">.</span></span><span style="color: #f5f5f5;font-family: Lucida Console;font-size: xx-small"><span style="color: #0000ff">Id</span> </span></li>
 	<li>Now the $VM doesn't have a NIC, so we can add the one in the new Subnet<span style="font-family: Lucida Console;font-size: xx-small"> </span><span style="color: #0000ff"><span style="font-family: Lucida Console;font-size: xx-small">$vm</span><span style="font-family: Lucida Console;font-size: xx-small"> </span><span style="font-family: Lucida Console;font-size: xx-small">=</span><span style="font-family: Lucida Console;font-size: xx-small"> </span><span style="font-family: Lucida Console;font-size: xx-small">Add-AzureRmVMNetworkInterface</span><span style="font-family: Lucida Console;font-size: xx-small"> </span><span style="font-family: Lucida Console;font-size: xx-small">-VM</span><span style="font-family: Lucida Console;font-size: xx-small"> </span><span style="font-family: Lucida Console;font-size: xx-small">$VM</span><span style="font-family: Lucida Console;font-size: xx-small"> </span><span style="font-family: Lucida Console;font-size: xx-small">-NetworkInterface</span><span style="font-family: Lucida Console;font-size: xx-small"> </span></span><span style="color: #ff4500;font-family: Lucida Console;font-size: xx-small"><span style="color: #0000ff">$NewNic</span></span></li>
 	<li>OK, have your change tickets ready!  We will stop the current VM and we'll have to remove it since that is the only way to get our NIC associated to the VM.<span style="font-family: Lucida Console;font-size: xx-small"> </span><span style="color: #0000ff"><span style="font-family: Lucida Console;font-size: xx-small">Stop-AzureRmVM</span><span style="font-family: Lucida Console;font-size: xx-small"> </span><span style="font-family: Lucida Console;font-size: xx-small">-Name</span><span style="font-family: Lucida Console;font-size: xx-small"> </span><span style="font-family: Lucida Console;font-size: xx-small">$VM</span><span style="font-family: Lucida Console;font-size: xx-small">.</span><span style="font-family: Lucida Console;font-size: xx-small">Name</span><span style="font-family: Lucida Console;font-size: xx-small"> </span><span style="font-family: Lucida Console;font-size: xx-small">-ResourceGroupName</span><span style="font-family: Lucida Console;font-size: xx-small"> </span><span style="font-family: Lucida Console;font-size: xx-small">$Vm</span><span style="font-family: Lucida Console;font-size: xx-small">.</span><span style="font-family: Lucida Console;font-size: xx-small">ResourceGroupName</span><span style="font-family: Lucida Console;font-size: xx-small"> </span><span style="font-family: Lucida Console;font-size: xx-small">-Force</span></span><span style="color: #0000ff"><span style="font-family: Lucida Console;font-size: xx-small"> </span><span style="font-family: Lucida Console;font-size: xx-small"></span></span><span style="color: #0000ff"><span style="font-family: Lucida Console;font-size: xx-small"> </span><span style="font-family: Lucida Console;font-size: xx-small">Remove-AzureRmVM</span><span style="font-family: Lucida Console;font-size: xx-small"> </span><span style="font-family: Lucida Console;font-size: xx-small">-Name</span><span style="font-family: Lucida Console;font-size: xx-small"> </span><span style="font-family: Lucida Console;font-size: xx-small">$VM</span><span style="font-family: Lucida Console;font-size: xx-small">.</span><span style="font-family: Lucida Console;font-size: xx-small">Name</span><span style="font-family: Lucida Console;font-size: xx-small"> </span><span style="font-family: Lucida Console;font-size: xx-small">-ResourceGroupName</span><span style="font-family: Lucida Console;font-size: xx-small"> </span><span style="font-family: Lucida Console;font-size: xx-small">$Vm</span><span style="font-family: Lucida Console;font-size: xx-small">.</span><span style="font-family: Lucida Console;font-size: xx-small">ResourceGroupName</span><span style="font-family: Lucida Console;font-size: xx-small"> </span></span><span style="color: #ffe4b5;font-family: Lucida Console;font-size: xx-small"><span style="color: #0000ff">-Force</span> </span></li>
 	<li>Next we create the new VM, using the $VM we have in memory, with the only change to the definition of the $VM being the network interface.  This step has turned out to be challenging.  Some VMs have Data Disks, some don't.  Some VM's may be Linux, some Windows.   The best way to illustrate the work done is to look at the <a href="https://github.com/willstg/AzureFoundation/blob/master/ARM/Compute/Utilities/ModifyVMVNET.ps1">PowerShell</a>.<span style="font-family: Lucida Console;font-size: xx-small"> </span><span style="color: #0000ff"><span style="font-family: Lucida Console;font-size: xx-small">$NewVM</span><span style="font-family: Lucida Console;font-size: xx-small"> </span><span style="font-family: Lucida Console;font-size: xx-small">=</span><span style="font-family: Lucida Console;font-size: xx-small"> </span><span style="font-family: Lucida Console;font-size: xx-small">$newVMConfig</span><span style="font-family: Lucida Console;font-size: xx-small"> </span><span style="font-family: Lucida Console;font-size: xx-small">|</span><span style="font-family: Lucida Console;font-size: xx-small"> </span><span style="font-family: Lucida Console;font-size: xx-small">New-AzureRmVM</span><span style="font-family: Lucida Console;font-size: xx-small"> </span><span style="font-family: Lucida Console;font-size: xx-small">-ResourceGroupName</span><span style="font-family: Lucida Console;font-size: xx-small"> </span><span style="font-family: Lucida Console;font-size: xx-small">$vm</span><span style="font-family: Lucida Console;font-size: xx-small">.</span><span style="font-family: Lucida Console;font-size: xx-small">ResourceGroupName</span><span style="font-family: Lucida Console;font-size: xx-small"> </span><span style="font-family: Lucida Console;font-size: xx-small">-Location</span><span style="font-family: Lucida Console;font-size: xx-small"> </span><span style="font-family: Lucida Console;font-size: xx-small">$vm</span><span style="font-family: Lucida Console;font-size: xx-small">.</span></span><span style="color: #f5f5f5;font-family: Lucida Console;font-size: xx-small"><span style="color: #0000ff">Location</span> </span></li>
</ul>
</li>
</ol>
Some concepts to add:
<ul>
 	<li>Add Extensions, in other words if the VM has extensions, make sure they get added back. $vm.extensions</li>
 	<li>Clean up the old NICs by removing them</li>
 	<li></li>
</ul>]]></content:encoded>
    </item>
  </channel>
</rss>