<?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>Azure Solution Architecture learnings</title>
    <atom:link
      href="https://docs.microsoft.com/archive/blogs/simonbrown/feed.xml"
      rel="self"
      type="application/rss+xml" />
    <link>https://docs.microsoft.com/archive/blogs/simonbrown/feed.xml</link>
    <description>Cloud Solution Architect postings from real world problems</description>
    <lastBuildDate>Wed, 17 Apr 2019 03:45:44 GMT</lastBuildDate>
    <language>en-US</language>
    <sy:updatePeriod>hourly</sy:updatePeriod>
    <sy:updateFrequency>1</sy:updateFrequency>
    <item>
      <title>The Discipline of Source Control</title>
      <link>https://docs.microsoft.com/archive/blogs/simonbrown/the-discipline-of-source-control</link>
      <pubDate>Tue, 25 Jul 2017 08:28:16 GMT</pubDate>
      <dc:creator><![CDATA[Simon Brown1]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.technet.microsoft.com/simonbrown/?p=66</guid>
      <description><![CDATA[Here I am again about to rebuild my PC. At this stage of cloud maturity for productivity, most of us...]]></description>
      <content:encoded><![CDATA[<p>Here I am again about to rebuild my PC. </p><p>At this stage of cloud maturity for productivity, most of us will have all of our documents, emails and contacts stored in one kind of cloud service or another. As I try to migrate from the loan PC to the permanent PC I notice I’ve been my usual sloppy self, and there are plenty of documents on the Desktop, and in the My Documents folder. Those are easy enough to clean up, but then I come to my C:\code folder and realise there are a number of things in there that are about to be lost.&nbsp; </p><p>It’s not that using source control is particularly hard, but it’s a discipline that needs to be practiced not only to protect assets worked on, but in my role to create a repository where I can easily share what I’ve been talking about with people I work with. </p><p>For a number of reasons, but mostly familiarity, I’m going to use GitHub. Creating a repository is incredibly simple, which means I’m up and running almost immediately. And as per above, I’m going to be making my repository public so that I can share what I’m working on with anyone who’s interested. Naturally the other key benefit is people can contribute as well.</p><p>Very important is to consider the license being used. For this repository which is going to store the code from my last post, I’m using the MIT license. MIT allows reuse of my code in most other licenses including GPL. There’s nothing secret in what the code does, and it can only be beneficial as an enabler to people who want to accelerate the setup of Open Live Writer, so an MIT license makes perfect sense. It’s something that does need to be understood though – there are many types of license available and the appropriate one for each type of code or project should be carefully considered. </p><p><a href="https://msdnshared.blob.core.windows.net/media/2017/07/image420.png"><img width="297" height="223" title="image" alt="image" src="https://msdnshared.blob.core.windows.net/media/2017/07/image_thumb351.png" border="0"></a></p><p>After clicking Create Repository, I have my empty repository ready to be used. </p><p><a href="https://msdnshared.blob.core.windows.net/media/2017/07/image421.png"><img width="296" height="157" title="image" alt="image" src="https://msdnshared.blob.core.windows.net/media/2017/07/image_thumb352.png" border="0"></a></p><p>Now I need to add my file(s). For what I have here, it’s really simple to just add them using the upload files button.</p><p><a href="https://msdnshared.blob.core.windows.net/media/2017/07/image422.png"><img width="65" height="29" title="image" alt="image" src="https://msdnshared.blob.core.windows.net/media/2017/07/image_thumb353.png" border="0"></a></p><p>and now it’s available and safely in source control for the next time I need it. </p><p><a href="https://msdnshared.blob.core.windows.net/media/2017/07/image423.png"><img width="244" height="80" title="image" style="margin: 0px" alt="image" src="https://msdnshared.blob.core.windows.net/media/2017/07/image_thumb354.png" border="0"></a></p><p>It’s a really basic thing to do, and something that’s well understood and managed in a software developer’s day, but something I often forget until it’s too late. I’ll be trying to make this a good habit to form. </p>]]></content:encoded>
    </item>
    <item>
      <title>Using Open Live Writer</title>
      <link>https://docs.microsoft.com/archive/blogs/simonbrown/using-open-live-writer</link>
      <pubDate>Fri, 23 Jun 2017 21:20:00 GMT</pubDate>
      <dc:creator><![CDATA[Simon Brown1]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.technet.microsoft.com/simonbrown/?p=45</guid>
      <description><![CDATA[For this blog I’ve started using Open Live Writer as my blogging tool. It’s been brought back to...]]></description>
      <content:encoded><![CDATA[<p>For this blog I’ve started using Open Live Writer as my blogging tool. It’s been brought back to life by a team of volunteers who have obtained sourcecode for the old Windows Live Writer tool that has been discontinued. </p><p>One of the things I’ve been keen to do is make sure I have a way to format my PowerShell scripts, as it’s my preferred way of automating what I do in Azure. </p><p>Open Live Writer doesn’t yet have plugin support, but searching around I found a <a href="https://richhewlett.com/wlwsourcecodeplugin/" target="_blank">plugin</a> written by a developer named Richard Hewlett. It needs to be manually updated, and thanks to numerous PC changes I seem to have been through the process three or four times now without ever getting a blog posted. After continually referring to Benjamin Perkins’ <a href="https://blogs.msdn.microsoft.com/benjaminperkins/2017/01/27/source-code-plug-in-for-wordpress-blogs-using-open-live-writer/" target="_blank">steps</a> to make this work, I’ve decided in the spirit of what I’m trying to achieve I should write a script that will automate the process. </p><p>First step is to download the file. It’s coming directly from the download area of Rich’s blog, so I’ve hard-coded the URL in. It’s at the top, so easy enough to change if/when the file is updated. The file comes down to the directory the script is run from, so the assumption is the credential it runs under has permission to write there.</p><p>Next up the destination directory for the plugins is created under the application folder. To attempt to future-proof the script I haven’t added the application version number, I’ve set it to iterate through folders that have “app-“ as the prefix. It’s not foolproof, but might keep the script working if the app team doesn’t change the folder structure. </p><p>The downloaded .zip file is then decompressed to the newly created plugin directory, which is made simple with the Expand-Archive cmdlet.</p><p>Finally there’s an xml file that needs a new element added. <em>OpenLiveWriter.exe.config </em>is in the main application directory, and needs the element loadFromRemoteSources added to runtime.</p><p>Put together, here’s the script, and it was used to setup Open Live Writer on my new machine to write this post!</p><div class="wlWriterEditableSmartContent" id="scid:C89E2BDB-ADD3-4f7a-9810-1B7EACF446C1:fbdf816d-2eee-4853-b8b7-b49732cc1ae8" style="margin: 0px;padding: 0px;float: none"><pre>

#download zip file for syntax highlighting
$url = &quot;https://richhewlett.blob.core.windows.net/blogdownloads/SyntaxHighlight_WordPressCom_OLWPlugIn_V2.0.0.zip&quot; 
$path = (Get-Item -Path &quot;.\&quot; -Verbose).FullName + &quot;\SyntaxHighlight_WordPressCom_OLWPlugIn_V2.0.0.zip&quot;

Write-Host &quot;Downloading [$url]`nSaving at [$path]&quot; 
$client = new-object System.Net.WebClient 
$client.DownloadFile($url, $path ) 
      
#create destination directory
$LocalAppDir = [Environment]::GetFolderPath(&quot;LocalApplicationData&quot;)
$OpenliveWriterDir = $LocalAppDir + &quot;\OpenLiveWriter&quot;

#just in case there are multiple versions installed, or there&#039;s an upgrade, enumerate the application binary folders
$appDirectories = Get-ChildItem $OpenliveWriterDir | Where-Object {$_ -like &quot;app-*&quot;};

foreach ($appDirectory in $appDirectories) {

    #Create destination directory
    $targetDir = $appDirectory.FullName + &quot;\Plugins&quot;
    if(!(Test-Path -Path $targetDir )){
        Write-Host &quot;Creating path $targetDir&quot;
        New-Item -ItemType directory -Path $targetDir
    }


    #decompress file into target directory
    Write-Host &quot;Expanding $path to $targetDir&quot;
    Expand-Archive $path -DestinationPath $targetDir

    #update config file
    $configFileName = $appDirectory.FullName + &quot;\OpenLiveWriter.exe.config&quot;
    [xml] $xml = gc $configFileName

    #create the new element
    $newitem = $xml.CreateElement(&quot;loadFromRemoteSources&quot;)
    $newitem.SetAttribute(&quot;enabled&quot;,&quot;true&quot;)

    #if it doesn&#039;t already exist in the file, add it and save
    if (!$xml.SelectSingleNode(&quot;//loadFromRemoteSources&quot;)) {
        $xml.DocumentElement.LastChild.AppendChild($newitem)
        $xml.Save($configFileName)
    }    
}


</pre>
</div><p>Blog posting done, and my next imminent rebuild streamlined. At least a little. </p>]]></content:encoded>
    </item>
  </channel>
</rss>