<?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>Shared Points</title>
    <atom:link
      href="https://docs.microsoft.com/archive/blogs/lukeb/feed.xml"
      rel="self"
      type="application/rss+xml" />
    <link>https://docs.microsoft.com/archive/blogs/lukeb/feed.xml</link>
    <description>items of some interest</description>
    <lastBuildDate>Fri, 10 Aug 2018 04:35:14 GMT</lastBuildDate>
    <language>en-US</language>
    <sy:updatePeriod>hourly</sy:updatePeriod>
    <sy:updateFrequency>1</sy:updateFrequency>
    <item>
      <title>Azure - "VMScaleSetCannotReferenceLoadbalancerWhenLargeScaleIsEnabled"</title>
      <link>https://docs.microsoft.com/archive/blogs/lukeb/azure-vmscalesetcannotreferenceloadbalancerwhenlargescaleisenabled</link>
      <pubDate>Mon, 06 Aug 2018 13:25:15 GMT</pubDate>
      <dc:creator><![CDATA[LukeBrennan]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.technet.microsoft.com/lukeb/?p=1535</guid>
      <description><![CDATA['VM scale set cannot reference a load balancer when LargeScale property is enabled.'

The error...]]></description>
      <content:encoded><![CDATA[<em>'VM scale set cannot reference a load balancer when LargeScale property is enabled.'</em>

The error may well leave you as puzzled as I was!

There is a checklist of things you require

<a href="https://docs.microsoft.com/en-us/azure/virtual-machine-scale-sets/virtual-machine-scale-sets-placement-groups">https://docs.microsoft.com/en-us/azure/virtual-machine-scale-sets/virtual-machine-scale-sets-placement-groups</a>

<span style="color: #0000ff">STANDARD</span> not BASIC for the <span style="color: #0000ff">Load-Balancer</span> is the first thing to check..

<a href="https://docs.microsoft.com/en-us/azure/virtual-network/virtual-network-ip-addresses-overview-arm">https://docs.microsoft.com/en-us/azure/virtual-network/virtual-network-ip-addresses-overview-arm</a>

and you probably need a <span style="color: #0000ff">Standard</span> SKU for your <span style="color: #0000ff">Public IP</span> too.

&nbsp;

&nbsp;

&nbsp;]]></content:encoded>
    </item>
    <item>
      <title>Azure - Virtual machine scale set does not support disk encryption</title>
      <link>https://docs.microsoft.com/archive/blogs/lukeb/azure-virtual-machine-scale-set-does-not-support-disk-encryption</link>
      <pubDate>Thu, 26 Jul 2018 20:45:34 GMT</pubDate>
      <dc:creator><![CDATA[LukeBrennan]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.technet.microsoft.com/lukeb/?p=1525</guid>
      <description><![CDATA[New-AzureRmResourceGroupDeployment : 3:49:21 PM - Resource Microsoft.Compute/virtualMachineScaleSets...]]></description>
      <content:encoded><![CDATA[<pre><span style="color: #0000ff">New-AzureRmResourceGroupDeployment</span> : <span style="color: #993366">3:49:21 PM - Resource Microsoft.Compute/virtualMachineScaleSets 'vmssfp6s' failed with message</span> '{
 <span style="color: #ff0000">"error": {</span>
 <span style="color: #ff0000"> "code": "NotSupported",</span>
 <span style="color: #ff0000"> "message": "Virtual machine scale set does not support disk encryption. Please remove Azure Disk Encryption extension from virtual machine scale set model."</span>
 <span style="color: #ff0000"> }</span>
 }'
 <span style="color: #339966">#Yet I see examples in GitHub - so is it supposed to work?</span></pre>
<pre><span style="color: #ff0000">$namespaces</span>=(<span style="color: #0000ff">Get-AzureRMresourceprovider</span>).ProviderNamespace
foreach (<span style="color: #ff0000">$Provider</span> in <span style="color: #ff0000">$namespaces</span>) {
 <span style="color: #0000ff">Get-AzureRmProviderFeature</span> -ProviderNamespace <span style="color: #ff0000">$Provider</span> -ListAvailable | FT
}

<span style="color: #ff0000">$State</span>=<span style="color: #0000ff">Get-AzureRmProviderFeature</span> -ProviderNamespace Microsoft.Compute -FeatureName <span style="color: #800000"><span style="color: #993300">'UnifiedDiskEncryption'</span></span>
if (<span style="color: #ff0000">$State</span>.RegistrationState -eq <span style="color: #993300">'NotRegistered'</span>) {
 <span style="color: #0000ff">Write-Verbose</span> <span style="color: #993300">'Register-AzureRmProviderFeature UnifiedDiskEncryption...'</span>
 <span style="color: #0000ff">Register-AzureRmProviderFeature</span> -ProviderNamespace Microsoft.Compute -FeatureName <span style="color: #800000"><span style="color: #993300">'UnifiedDiskEncryption'</span></span>
 Do {
  <span style="color: #0000ff">sleep</span> -Seconds 30
  <span style="color: #ff0000">$state</span>=<span style="color: #0000ff">Get-AzureRmProviderFeature</span> -ProviderNamespace Microsoft.Compute -FeatureName <span style="color: #800000"><span style="color: #993300">'UnifiedDiskEncryption'</span></span>
 }
 until (<span style="color: #ff0000">$state</span>.RegistrationState -eq <span style="color: #993300">'Registered'</span>)
}
<strong><span style="color: #339966"># NOW it works...
</span></strong></pre>]]></content:encoded>
    </item>
    <item>
      <title>Azure - PowerShell Azure locations with zones</title>
      <link>https://docs.microsoft.com/archive/blogs/lukeb/azure-powershell-azure-locations-with-zones</link>
      <pubDate>Tue, 10 Jul 2018 15:56:36 GMT</pubDate>
      <dc:creator><![CDATA[LukeBrennan]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.technet.microsoft.com/lukeb/?p=1505</guid>
      <description><![CDATA[#Requires -module AzureRM
#find regions that support Zones and what VM SKus are...]]></description>
      <content:encoded><![CDATA[<pre><span style="color: #339966">#Requires -module AzureRM</span>
<span style="color: #339966">#find regions that support Zones and what VM SKus are supported</span>

function<span style="color: #800080"> Get-AzureRMlocationZones</span> {
  PARAM (<span style="color: #ff0000">$location</span>,<span style="color: #ff0000">$ComputeResourceSku</span>)

<span style="color: #ff0000">  $sku</span>=<span style="color: #0000ff">Get-AzureRmComputeResourceSku </span>| <span style="color: #0000ff">Where-Object</span> {$_.ResourceType -eq '<span style="color: #993366">virtualMachines</span>' -and $_.LocationInfo.Zones }

  if (<span style="color: #ff0000">$location</span>) {
    <span style="color: #ff0000">$sku</span> = <span style="color: #ff0000">$sku</span> | <span style="color: #0000ff">Where-Object</span> {<span style="color: #ff0000">$_</span>.Locations -eq <span style="color: #ff0000">$location</span>}
  }

  if (<span style="color: #ff0000">$ComputeResourceSku</span>) {
    <span style="color: #ff0000">$sku</span> = <span style="color: #ff0000">$sku</span> | <span style="color: #0000ff">Where-Object </span>{<span style="color: #ff0000">$_</span>.Name -eq <span style="color: #ff0000">$ComputeResourceSku</span>}
  }

<span style="color: #ff0000">  $sku</span>
 }

<span style="color: #339966">#Get-AzureRMlocationZones -Location FranceCentral -Name Standard_D12_v2</span>
 <span style="color: #0000ff">Get-AzureRMlocationZones</span> -ComputeResourceSku <span style="color: #800080">Standard_D12_v2</span></pre>]]></content:encoded>
    </item>
    <item>
      <title>PowerShell DSC - LocalConfigurationManager cycle behaviour</title>
      <link>https://docs.microsoft.com/archive/blogs/lukeb/powershell-dsc-localconfigurationmanager-cycle-behaviour</link>
      <pubDate>Fri, 01 Jun 2018 19:44:12 GMT</pubDate>
      <dc:creator><![CDATA[LukeBrennan]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.technet.microsoft.com/lukeb/?p=1495</guid>
      <description><![CDATA[LCM will start the 15 minute cycle based on:
• A new metaconfig is applied using...]]></description>
      <content:encoded><![CDATA[LCM will start the <span style="color: #000080">15 minute</span> cycle based on:
• A new metaconfig is applied using <span style="color: #333399">Set-DscLocalConfigurationManager</span>
• A machine restart
• For any condition where the timer process experiences a crash, that will be detected within <span style="color: #000080">30 seconds</span> and the cycle will be restarted

The start time is absolute.
This means if an operation begins at <span style="color: #ff0000">T0</span> and some other activity is in progress at time <span style="color: #ff0000">T1</span> and takes <span style="color: #000080">5 minutes</span>,
the next timer will kick in after <span style="color: #ff0000">T1+15</span> (with<span style="color: #000080"> 15 minute</span> frequency).
If an operation is already in progress and the duration exceeds the configured cycle frequency, the next timer will not start.

Example, the metaconfig is configured at a <span style="color: #000080">15 minute</span> pull frequency and a pull occurs at <span style="color: #ff0000">T1</span>.
The node does not finish work (such as setting a configuration) for <span style="color: #000080">16 minutes</span>.
At <span style="color: #ff0000">T1+15</span>, the timer is ignored and next pull will happen at <span style="color: #ff0000">T1+15+15</span>.]]></content:encoded>
    </item>
    <item>
      <title>Azure - PowerShell setting Blob Tiers</title>
      <link>https://docs.microsoft.com/archive/blogs/lukeb/azure-powerrshell-setting-blob-tiers</link>
      <pubDate>Fri, 25 May 2018 16:53:35 GMT</pubDate>
      <dc:creator><![CDATA[LukeBrennan]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.technet.microsoft.com/lukeb/?p=1475</guid>
      <description><![CDATA[function Set-AgedBlobsToTier  {
 PARAM (
       [Parameter(Mandatory = $true)] [int] $AgeInDays,...]]></description>
      <content:encoded><![CDATA[<font size="1"><pre><span style="font-family: Consolas,Monaco,monospace font-size: 7pt"><span style="color: #000080">function</span> <span style="color: #ff00ff">Set-AgedBlobsToTier </span> {
 <span style="color: #000080">PARAM</span> (
       [<span style="color: #00ccff">Parameter</span>(Mandatory = <span style="color: #ff0000">$true</span>)] [<span style="color: #008080">int</span>] <span style="color: #ff0000">$AgeInDays</span>,
       [<span style="color: #00ccff">Parameter</span>(Mandatory = <span style="color: #ff0000">$true</span>)] [<span style="color: #008080">Microsoft.WindowsAzure.Storage.Blob.Standardblobtier</span>] <span style="color: #ff0000">$StorageTier</span>,
       [<span style="color: #00ccff">Parameter</span>(Mandatory = <span style="color: #ff0000">$true</span>)] [<span style="color: #008080">string</span>]<span style="color: #ff0000">$ResourceGroupName</span>,
       [<span style="color: #00ccff">Parameter</span>(Mandatory = <span style="color: #ff0000">$true</span>)] [<span style="color: #008080">string</span>]<span style="color: #ff0000">$StorageAccountName</span>
      )</span>
<span style="font-family: Consolas,Monaco,monospace font-size: 7pt">     <span style="color: #ff0000">$StorageAccountName</span> = <span style="color: #ff0000">$StorageAccountName</span>.ToLower()</span>

<span style="color: #000080">     if </span> (<span style="color: #0000ff">Get-AzureRmStorageAccount</span> <span style="color: #000080">-ResourceGroupName</span> <span style="color: #ff0000">$ResourceGroupName</span> <span style="color: #000080">-Name</span> <span style="color: #ff0000">$StorageAccountName</span> -EA <span style="color: #ff00ff">SilentlyContinue</span>)  {

       <span style="color: #ff0000">$StorageAccountKeys</span>    = <span style="color: #0000ff">Get-AzureRmStorageAccountKey</span> <span style="color: #000080">-ResourceGroupName</span> <span style="color: #ff0000">$ResourceGroupName</span> <span style="color: #000080">-Name</span> <span style="color: #ff0000">$StorageAccountName</span>
       <span style="color: #ff0000">$StorageAccountKey </span>    = <span style="color: #ff0000">$StorageAccountKeys</span>[<span style="color: #800080">0</span>].Value
       <span style="color: #ff0000">$StorageAccountContext</span> = <span style="color: #0000ff">New-AzureStorageContext</span> <span style="color: #000080">-StorageAccountName</span> <span style="color: #ff0000">$StorageAccountName</span> <span style="color: #000080">-StorageAccountKey</span> <span style="color: #ff0000">$StorageAccountKey</span>
       <span style="color: #ff0000">$StorageContainers </span>    = <span style="color: #0000ff">Get-AzureStorageContainer</span> <span style="color: #000080">-Context</span> <span style="color: #ff0000">$StorageAccountContext</span>

<span style="font-family: Consolas,Monaco,monospace font-size: 7pt">       <span style="color: #339966">#retrieve all blobs from containers</span>
       <span style="color: #ff0000">$Blobs</span> = @()
       <span style="color: #333399">foreach</span>(<span style="color: #ff0000">$StorageContainer</span> <span style="color: #333399">in</span> <span style="color: #ff0000">$StorageContainers</span>) {
         <span style="color: #ff0000">$Blobs</span> += <span style="color: #0000ff">Get-AzureStorageBlob</span> <span style="color: #333399">-Context</span> <span style="color: #ff0000">$StorageAccountContext</span> <span style="color: #333399">-Container</span> <span style="color: #ff0000">$StorageContainer</span>.Name
       }</span>

<span style="font-family: Consolas,Monaco,monospace font-size: 7pt">       <span style="color: #ff0000">$RetentionDate</span> = (<span style="color: #0000ff">Get-Date</span>).ToUniversalTime().AddDays(-<span style="color: #ff0000">$AgeInDays</span>)
       <span style="color: #ff0000">$ifNotModifiedSinceTime</span>=[<span style="color: #008080">Microsoft.WindowsAzure.Storage.AccessCondition</span>]::GenerateIfNotModifiedSinceCondition( <span style="color: #ff0000">$RetentionDate</span> )</span>

<span style="font-family: Consolas,Monaco,monospace font-size: 7pt">      <span style="color: #339966"> # now apply the tier</span>
       <span style="color: #333399">Foreach</span>(<span style="color: #ff0000">$Blob</span> in <span style="color: #ff0000">$Blobs</span>) {
         <span style="color: #0000ff">Write-Verbose</span> <span style="color: #333399">-Message</span> (<span style="color: #800000">'checking {0}'</span> -f  <span style="color: #ff0000">$Blob</span>.ICloudBlob.Uri.AbsoluteUri)
         <span style="color: #ff0000">$Blob</span>.ICloudBlob.SetStandardBlobTier(<span style="color: #ff0000">$StorageTier</span>,<span style="color: #ff0000">$ifNotModifiedSinceTime</span>)
       }</span>
<span style="font-family: Consolas,Monaco,monospace font-size: 7pt">    }
    <span style="color: #333399">else</span> {
      <span style="color: #0000ff">Write-Error</span> <span style="color: #333399">-Message</span> (<span style="color: #800000">'{0} was not found'</span> -f <span style="color: #ff0000">$StorageAccountName</span>)
    }</span>

<span style="font-family: Consolas,Monaco,monospace font-size: 7pt">}</span>
<span style="font-family: Consolas,Monaco,monospace font-size: 7pt">
 <span style="color: #0000ff">Set-AgedBlobsToTier</span> <span style="color: #333399">-AgeInDays</span> 30 <span style="color: #333399">-StorageTier</span> Cool <span style="color: #333399">-ResourceGroupName</span> <span style="color: #800000">'testing'</span> <span style="color: #333399">-StorageAccountName</span> <span style="color: #800000">'somenamehere' </span> <span style="color: #333399">-Verbose</span>
 </span></pre></font>]]></content:encoded>
    </item>
    <item>
      <title>Windows 10 and "no longer located in"</title>
      <link>https://docs.microsoft.com/archive/blogs/lukeb/windows-10-and-no-longer-located-in</link>
      <pubDate>Wed, 25 Apr 2018 17:26:43 GMT</pubDate>
      <dc:creator><![CDATA[LukeBrennan]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.technet.microsoft.com/lukeb/?p=1465</guid>
      <description><![CDATA[After numerous updates to Windows 10 on the fast track, I realised there were a half-dozen folders...]]></description>
      <content:encoded><![CDATA[After numerous updates to Windows 10 on the fast track, I realised there were a half-dozen folders that seemed to be rubbish yet I could not delete.
<pre><span style="float: none;background-color: transparent;color: #333333;cursor: text;font-family: Georgia,'Times New Roman','Bitstream Charter',Times,serif;font-size: 16px;font-style: normal;font-variant: normal;font-weight: 400;letter-spacing: normal;line-height: 24px;text-align: left;text-decoration: none;text-indent: 0px">'C:\Windows.Old\Users\lukeb\AppData\Local\Packages\Microsoft.Windows.Cortana_cw5n1h2txyewy\LocalState..'</span></pre>
I ended up renaming them as DELETEME95-99 and thought a reboot or maybe a CHKDSK/F would see them gone.

But no. Still saying they don't exist but they are cannot be deleted using Explorer.  I assume it was the strange folder with trailing dots on "LocalState.." causing this.

Launched CMD as<em> Administrator</em> and did the following to rid me of the 'LocalState..' folder.
<pre>rd /s "\\?\C:\DELETEME99\Users\lukeb\AppData\Local\Packages\Microsoft.Windows.Cortana_cw5n1h2txyewy"</pre>
yes, the folders will now delete.

&nbsp;

&nbsp;]]></content:encoded>
    </item>
    <item>
      <title>PowerShell - reinstall Windows 10 Store app</title>
      <link>https://docs.microsoft.com/archive/blogs/lukeb/powershell-reinstall-windows-10-store-app</link>
      <pubDate>Fri, 02 Mar 2018 17:00:12 GMT</pubDate>
      <dc:creator><![CDATA[LukeBrennan]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.technet.microsoft.com/lukeb/?p=1435</guid>
      <description><![CDATA[#Reinstall-StoreApp.ps1
#Requires -RunAsAdministrator

$Store=Get-Appxpackage -Allusers |...]]></description>
      <content:encoded><![CDATA[<pre><span style="color: #339966">#Reinstall-StoreApp.ps1</span>
<span style="color: #339966">#Requires -RunAsAdministrator</span>

<span style="color: #ff0000">$Store</span>=<span style="color: #0000ff">Get-Appxpackage</span> <span style="color: #333399">-Allusers</span> |
 <span style="color: #0000ff">Where-Object</span> {<span style="color: #ff0000">$_</span>.PackageFullName -match '<span style="color: #800000">WindowsStore</span>'} |
   <span style="color: #0000ff">Sort-Object</span> <span style="color: #333399">-Property</span> <span style="color: #cc99ff">Version</span> <span style="color: #333399">-Descending</span> |
     <span style="color: #0000ff">Select-Object</span><span style="color: #333399"> -First</span> 1

<span style="color: #ff0000">$PackageName</span>=<span style="color: #ff0000">$Store</span>.PackageFullName
<span style="color: #ff0000">$StoreManifest</span> = "<span style="color: #800000">C:\Program Files\WindowsApps\</span><span style="color: #ff0000">$PackageName</span>\<span style="color: #800000">AppxManifest.xml</span>"

if (<span style="color: #0000ff">Test-Path</span> <span style="color: #333399">-Path</span> <span style="color: #ff0000">$StoreManifest</span>) {
 <span style="color: #0000ff">Add-AppxPackage</span> <span style="color: #333399">-register</span> <span style="color: #ff0000">$StoreManifest</span><span style="color: #333399"> -DisableDevelopmentMode</span>
}</pre>]]></content:encoded>
    </item>
    <item>
      <title>PowerShell Azure - Get-AzureExtensionHighestVersion</title>
      <link>https://docs.microsoft.com/archive/blogs/lukeb/powershell-azure-get-azureextensionhighestversion</link>
      <pubDate>Thu, 14 Dec 2017 16:03:59 GMT</pubDate>
      <dc:creator><![CDATA[LukeBrennan]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.technet.microsoft.com/lukeb/?p=1426</guid>
      <description><![CDATA[function Get-AzureExtensionHighestVersion {
   [CmdletBinding()]
   PARAM ([string]$extension,...]]></description>
      <content:encoded><![CDATA[<span style="margin: 0px;color: darkblue;font-family: 'Lucida Console';font-size: 9pt">function</span><span style="margin: 0px;font-family: 'Lucida Console';font-size: 9pt"><span style="color: #000000"> </span><strong><span style="color: #800080">Get-AzureExtensionHighestVersion<span> {
</span></span></strong></span><span style="margin: 0px;font-family: 'Lucida Console';font-size: 9pt"><span style="color: #000000">   </span><span>[</span><span style="color: #00ccff">CmdletBinding</span><span style="color: #000000">()</span><span>]
</span></span><span style="margin: 0px;font-family: 'Lucida Console';font-size: 9pt"><span style="color: #000000">   </span><span>PARAM</span><span style="color: #000000"> (</span><span>[</span><span style="color: #339966">string</span><span>]</span><span style="color: #ff0000">$extension</span><span>,</span><span style="color: #000000"> </span><span>[</span><span style="color: #339966">string</span><span>]</span><span style="color: #ff0000"><span> </span>$location</span><span>=</span><span>'<span style="color: #800000">AustraliaEast</span>'</span><span style="color: #000000">)</span></span><span style="margin: 0px;font-family: 'Lucida Console';font-size: 9pt"><span style="color: #000000"> </span></span>

<span style="margin: 0px;font-family: 'Lucida Console';font-size: 9pt"><span style="color: #000000">   </span><span style="color: #ff0000">$sortProps<span> </span></span><span>=</span><span style="color: #000000"> @{Expression </span><span>=</span><span style="color: #000000"> </span><span>"<span style="color: #800000">PublisherName</span>"</span><span style="color: #000000">; Descending </span><span>=</span><span style="color: #000000"> </span><span style="color: #ff0000">$True</span><span style="color: #000000">}</span><span>,</span><span style="color: #000000"> @{Expression </span><span>=</span><span style="color: #000000"> </span><span>"<span style="color: #800000">Type</span>"</span><span style="color: #000000">; Descending </span><span>=</span><span style="color: #ff0000"><span> </span>$True</span><span style="color: #000000">}</span><span>,</span><span style="color: #000000">@{Expression </span><span>=</span><span style="color: #000000"> </span><span>"<span style="color: #800000">Version</span>"</span><span style="color: #000000">; Descending </span><span>=</span><span style="color: #000000"> </span><span style="color: #ff0000">$True</span><span style="color: #000000">}
</span></span><span style="margin: 0px;font-family: 'Lucida Console';font-size: 9pt"><span style="color: #000000">  </span></span><span style="margin: 0px;font-family: 'Lucida Console';font-size: 9pt"><span style="color: #000000"> </span><span style="color: #ff0000">$Results</span><span>=</span><span style="color: #000000"> </span><span style="color: #0000ff">Get-AzureRmVmImagePublisher</span><span style="color: #000000"> </span><span>-Location</span><span style="color: #000000"> </span><span style="color: #ff0000">$location</span><span style="color: #000000"> </span><span>|</span><span style="color: #000000">
</span></span><span style="margin: 0px;font-family: 'Lucida Console';font-size: 9pt"><span style="color: #000000">     </span><span style="color: #0000ff">Get-AzureRmVMExtensionImageType</span><span style="color: #000000"> </span><span>|</span><span style="color: #000000">
</span></span><span style="margin: 0px;font-family: 'Lucida Console';font-size: 9pt"><span style="color: #000000">      </span><span style="color: #0000ff">Get-AzureRmVMExtensionImage</span><span style="color: #000000"> </span><span>|</span><span style="color: #000000">
<span> </span><span> </span><span> </span><span> </span><span> </span><span> </span> </span></span><span style="margin: 0px;font-family: 'Lucida Console';font-size: 9pt"><span style="color: #0000ff">Where-Object</span><span style="color: #000000"> {</span><span>$_</span><span>.</span><span style="color: #000000">Type </span><span>-LIKE</span><span style="color: #000000"> </span><span>"*</span><span style="color: #ff0000">$extension</span><span>*"</span><span style="color: #000000">}</span></span>

<span style="margin: 0px;font-family: 'Lucida Console';font-size: 9pt"><span style="color: #000000">  </span><span><span style="color: #008000">#replace version text with version object type</span>
</span></span><span style="margin: 0px;font-family: 'Lucida Console';font-size: 9pt"><span style="color: #000000">  </span><span style="color: #ff0000">$versions</span><span>=</span><span style="color: #ff0000">$Results</span><span style="color: #000000"> </span><span>|</span><span style="color: #0000ff"><span> </span>Select-Object</span><span style="color: #000000"> </span><span>-Property</span><span style="color: #000000"> </span><span style="color: #800080">PublisherName</span><span>,</span><span style="color: #000000"> </span><span style="color: #800080">Type</span><span>,</span><span style="color: #000000"> @{N</span><span>=</span><span>'<span style="color: #800000">Version</span>'</span><span style="color: #000000">;E</span><span>=</span><span style="color: #000000">{(</span><span>[</span><span style="color: #339966">version</span><span>]</span><span style="color: #000000"> </span><span style="color: #ff0000">$_</span><span>.</span><span style="color: #000000">Version)}} </span></span>

<span style="color: #008000"><span style="margin: 0px;font-family: 'Lucida Console';font-size: 9pt"> </span><span style="margin: 0px;font-family: 'Lucida Console';font-size: 9pt"> # first sort the whole table, then groupby on a dummy key of Publisher+Type
</span>    <span style="margin: 0px;font-family: 'Lucida Console';font-size: 9pt"># </span></span><span style="margin: 0px;font-family: 'Lucida Console';font-size: 9pt"><span><span style="color: #008000">- then we only want the first from each group. voila!</span>
</span></span>

<span style="margin: 0px;font-family: 'Lucida Console';font-size: 9pt"><span> </span></span>

<span style="margin: 0px;font-family: 'Lucida Console';font-size: 9pt"><span></span></span><span style="margin: 0px;font-family: 'Lucida Console';font-size: 9pt"><span style="color: #000000">  </span><span style="color: #ff0000">$output<span> </span></span><span>=</span><span style="color: #ff0000"><span> </span>$versions</span><span style="color: #000000"> </span><span>|</span><span style="color: #000000"> </span><span>Sort-Object</span><span style="color: #ff0000"><span> </span>$sortProps</span><span style="color: #000000"> </span><span>|</span><span style="color: #000000">
</span></span><span style="margin: 0px;font-family: 'Lucida Console';font-size: 9pt"><span style="color: #000000">  </span><span style="color: #0000ff">Select-Object</span><span style="color: #000000"> </span><span>*</span><span>,</span><span style="color: #000000">@{N</span><span>=</span><span>'<span style="color: #800000">XXX</span>'</span><span style="color: #000000">;E</span><span>=</span><span style="color: #000000">{</span><span style="color: #ff0000">$_</span><span>.</span><span style="color: #000000">PublisherName</span><span>+</span><span>' '</span><span>+</span><span style="color: #ff0000">$_</span><span>.</span><span style="color: #000000">Type }} </span><span>|</span><span style="color: #000000"> </span><span style="color: #0000ff">Group-Object</span><span style="color: #000000"> </span><span>-Property</span><span style="color: #000000"> </span><span style="color: #800080">XXX</span><span style="color: #000000"> </span><span>|</span><span style="color: #000000">
</span></span><span style="margin: 0px;font-family: 'Lucida Console';font-size: 9pt"><span style="color: #000000">      </span><span style="color: #0000ff">Foreach-Object</span><span style="color: #000000"> {</span><span style="color: #ff0000">$_</span><span>.</span><span style="color: #000000">Group</span><span>[</span><span style="color: #800080">0</span><span>]</span><span style="color: #000000"> </span><span>|</span><span style="color: #0000ff"> <span></span>Select-Object</span><span style="color: #000000"> </span><span style="color: #800080">Type</span><span>,</span><span style="color: #800080">PublisherName</span><span>,</span><span style="color: #800080">Version</span><span style="color: #000000">} </span></span>

<span style="margin: 0px;font-family: 'Lucida Console';font-size: 9pt"><span style="color: #000000"> </span></span><span style="margin: 0px;font-family: 'Lucida Console';font-size: 9pt"><span style="color: #000000"> </span><span><span style="color: #ff0000">$output</span>
</span></span><span style="margin: 0px;font-family: 'Lucida Console';font-size: 9pt"><span style="color: #000000">}</span></span>

<span style="margin: 0px;font-family: 'Lucida Console';font-size: 9pt"><span style="color: #000000"> </span></span>

<span style="margin: 0px;color: blue;font-family: 'Lucida Console';font-size: 9pt">Get-AzureExtensionHighestVersion</span><span style="margin: 0px;font-family: 'Lucida Console';font-size: 9pt"><span style="color: #000000"> </span><span style="color: #800080">DSC </span></span>]]></content:encoded>
    </item>
    <item>
      <title>Azure - DSC automation (Windows vs Linux)</title>
      <link>https://docs.microsoft.com/archive/blogs/lukeb/azure-dsc-automation-windows-vs-linux</link>
      <pubDate>Thu, 14 Dec 2017 14:06:00 GMT</pubDate>
      <dc:creator><![CDATA[LukeBrennan]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.technet.microsoft.com/lukeb/?p=1405</guid>
      <description><![CDATA[{
"$schema":...]]></description>
      <content:encoded><![CDATA[{
"$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
"contentVersion": "1.0.0.0",
"parameters": {
"OS": {
"type": "string",
"defaultValue": "Windows",
"allowedValues": [
"Linux",
"Windows"
],
"metadata": {
"description": "DSC extension selection setting. Linux, Windows"
}
},
"vmName": {
"type": "string",
"metadata": {
"description": "Name of the existing VM to apply the DSC configuration to"
}
},
"modulesUrl": {
"type": "string",
"defaultValue": "https://github.com/Azure/azure-quickstart-templates/raw/master/dsc-extension-azure-automation-pullserver/UpdateLCMforAAPull.zip",
"metadata": {
"description": "URL for the DSC configuration package. NOTE: Can be a Github url(raw) to the zip file (this is the default value)"
}
},
"configurationFunction": {
"type": "string",
"defaultValue": "UpdateLCMforAAPull.ps1\\ConfigureLCMforAAPull",
"metadata": {
"description": "DSC configuration function to call. Should contain filename and function in format fileName.ps1\\configurationfunction"
}
},
"registrationKey": {
"type": "securestring",
"metadata": {
"description": "Registration key to use to onboard to the Azure Automation DSC pull/reporting server"
}
},
"registrationUrl": {
"type": "string",
"metadata": {
"description": "Registration url of the Azure Automation DSC pull/reporting server"
}
},
"nodeConfigurationName": {
"type": "string",
"metadata": {
"description": "The name of the node configuration, on the Azure Automation DSC pull server, that this node will be configured as"
}
},
"configurationMode": {
"type": "string",
"defaultValue": "ApplyAndAutoCorrect",
"allowedValues": [
"ApplyOnly",
"ApplyAndMonitor",
"ApplyAndAutoCorrect"
],
"metadata": {
"description": "DSC agent (LCM) configuration mode setting. ApplyOnly, ApplyAndMonitor, or ApplyAndAutoCorrect"
}
},
"configurationModeFrequencyMins": {
"type": "int",
"defaultValue": 15,
"metadata": {
"description": "DSC agent (LCM) configuration mode frequency setting, in minutes"
}
},
"refreshFrequencyMins": {
"type": "int",
"defaultValue": 30,
"metadata": {
"description": "DSC agent (LCM) refresh frequency setting, in minutes"
}
},
"rebootNodeIfNeeded": {
"type": "bool",
"defaultValue": true,
"metadata": {
"description": "DSC agent (LCM) rebootNodeIfNeeded setting"
}
},
"actionAfterReboot": {
"type": "string",
"defaultValue": "ContinueConfiguration",
"allowedValues": [
"ContinueConfiguration",
"StopConfiguration"
],
"metadata": {
"description": "DSC agent (LCM) actionAfterReboot setting. ContinueConfiguration or StopConfiguration"
}
},
"allowModuleOverwrite": {
"type": "bool",
"defaultValue": false,
"metadata": {
"description": "DSC agent (LCM) allowModuleOverwrite setting"
}
},
"timestamp": {
"type": "string",
"metadata": {
"description": "The current datetime, as a string, to force the request to go through ARM even if all fields are the same as last ARM deployment of this template; example in parameters file is in MM/dd/yyyy H:mm:ss tt format"
}
}
},
"variables": {

},
"resources": [
{
<span style="color: #ff0000">"condition": "[equals(parameters('OS'), 'Linux')]",</span>
"type": "Microsoft.Compute/virtualMachines/extensions",
"name": "[concat(parameters('vmName'),'/<span style="color: #0000ff">Microsoft.OSTCExtensions.DSCForLinux'</span>)]",
"location": "[resourceGroup().location]",
"apiVersion": "2016-04-30-preview",
"properties": {
"publisher": "<span style="color: #0000ff">Microsoft.OSTCExtensions</span>",
"type": "<span style="color: #0000ff">DSCForLinux</span>",
"forceUpdateTag": "RerunExtension",
"typeHandlerVersion": "<span style="color: #0000ff">2.7</span>",
"autoUpgradeMinorVersion": <span style="color: #0000ff">true</span>,
"settings": {
"<span style="color: #993366">ExtensionAction</span>": "Register",
"<span style="color: #993366">NodeConfigurationName</span>": "[parameters('nodeConfigurationName')]",
"<span style="color: #993366">RefreshFrequencyMins</span>": "[parameters('refreshFrequencyMins')]",
"<span style="color: #993366">ConfigurationMode</span>": "[parameters('configurationMode')]",
"<span style="color: #993366">ConfigurationModeFrequencyMins</span>": "[parameters('configurationModeFrequencyMins')]"
},
"protectedSettings": {
"<span style="color: #993366">RegistrationUrl</span>": "[parameters('registrationUrl')]",
"<span style="color: #993366">RegistrationKey"</span>: "[parameters('registrationKey')]"
}
}
},
{
<span style="color: #ff0000">"condition": "[equals(parameters('OS'), 'Windows')]",</span>
"type": "Microsoft.Compute/virtualMachines/extensions",
"name": "[concat(parameters('vmName'),'<span style="color: #0000ff">/Microsoft.Powershell.DSC</span>')]",
"apiVersion": "2016-04-30-preview",
"location": "[resourceGroup().location]",
"properties": {
"publisher": "<span style="color: #0000ff">Microsoft.Powershell</span>",
"type": "<span style="color: #0000ff">DSC</span>",
"forceUpdateTag": "RerunExtension",
"typeHandlerVersion": "<span style="color: #0000ff">2.72</span>",
"autoUpgradeMinorVersion":<span style="color: #0000ff"> true</span>,
"protectedSettings": {
"Items": {
"registrationKeyPrivate": "[parameters('registrationKey')]"
}
},
"settings": {
"<span style="color: #993366">ModulesUrl</span>": "[parameters('modulesUrl')]",
"SasToken": "",
"ConfigurationFunction": "[parameters('configurationFunction')]",
"Properties": [
{
"Name": "<span style="color: #993366">RegistrationKey</span>",
"Value": {
"UserName": "PLACEHOLDER_DONOTUSE",
"Password": "PrivateSettingsRef:registrationKeyPrivate"
},
"TypeName": "System.Management.Automation.PSCredential"
},
{
"Name": "<span style="color: #993366">RegistrationUrl</span>",
"Value": "[parameters('registrationUrl')]",
"TypeName": "System.String"
},
{
"Name": "<span style="color: #993366">NodeConfigurationName</span>",
"Value": "[parameters('nodeConfigurationName')]",
"TypeName": "System.String"
},
{
"Name": "<span style="color: #993366">ConfigurationMode</span>",
"Value": "[parameters('configurationMode')]",
"TypeName": "System.String"
},
{
"Name": "<span style="color: #993366">ConfigurationModeFrequencyMins</span>",
"Value": "[parameters('configurationModeFrequencyMins')]",
"TypeName": "System.Int32"
},
{
"Name": "<span style="color: #993366">RefreshFrequencyMins</span>",
"Value": "[parameters('refreshFrequencyMins')]",
"TypeName": "System.Int32"
},
{
"Name": "<span style="color: #993366">RebootNodeIfNeeded</span>",
"Value": "[parameters('rebootNodeIfNeeded')]",
"TypeName": "System.Boolean"
},
{
"Name": "<span style="color: #993366">ActionAfterReboot</span>",
"Value": "[parameters('actionAfterReboot')]",
"TypeName": "System.String"
},
{
"Name": "<span style="color: #993366">AllowModuleOverwrite</span>",
"Value": "[parameters('allowModuleOverwrite')]",
"TypeName": "System.Boolean"
},
{
"Name": "<span style="color: #993366">Timestamp</span>",
"Value": "[parameters('timestamp')]",
"TypeName": "System.String"
}
],
"advancedOptions": {
"<span style="color: #0000ff">forcePullAndApply</span>": true
}
}
}
}
]
}]]></content:encoded>
    </item>
    <item>
      <title>PowerShell - DSC Linux MOFs and logs</title>
      <link>https://docs.microsoft.com/archive/blogs/lukeb/powershell-dsc-linux-mofs-and-logs</link>
      <pubDate>Tue, 12 Dec 2017 11:53:00 GMT</pubDate>
      <dc:creator><![CDATA[LukeBrennan]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.technet.microsoft.com/lukeb/?p=1385</guid>
      <description><![CDATA[working with DSC on Linux, there are a few things to know that don't seem to be documented anywhere...]]></description>
      <content:encoded><![CDATA[<span><span style="color: #000000;font-family: Calibri">working with DSC on Linux, there are a few things to know that don't seem to be documented anywhere obvious. </span></span>

<span><span style="color: #000000;font-family: Calibri">OMI stuff  lives in
</span></span><span><span style="color: #000000;font-family: Calibri"><span style="color: #0000ff">/opt/omi/lib</span>
</span></span><span style="color: #0000ff"><span style="font-family: Calibri">/opt/omi/bin</span></span>

<span><span style="color: #000000;font-family: Calibri"> For troubleshooting you look at the logs which are here:
</span></span><span><span style="color: #000000;font-family: Calibri">cat <span style="color: #0000ff">/var/opt/omi/log/omiserver.log  </span>     <span style="color: #339966">  #the OMI CIM server</span>
</span></span><span><span style="color: #000000;font-family: Calibri">cat </span><span style="color: #0000ff">/var/opt/omi/log/dsc.log </span>              <span style="color: #339966;font-family: Calibri">#the LCM and DSC logging. Start your troubleshooting here!</span></span>

<span><span style="color: #000000;font-family: Calibri">the MOFs are in </span><span style="color: #0000ff">/etc/opt/omi/conf/dsc/configuration</span>
</span><span><span style="color: #000000;font-family: Calibri">backup.mof
</span></span><span><span style="color: #000000;font-family: Calibri">Current.mof
</span></span><span><span style="color: #000000;font-family: Calibri">Failed.mof
</span></span><span><span style="color: #000000;font-family: Calibri">MetaConfig.mof
</span></span><span><span style="color: #000000;font-family: Calibri">DSCEngineCache.mof</span></span>

<span><span style="color: #000000;font-family: Calibri">modules live in  ls </span><span style="color: #0000ff">/opt/microsoft/dsc/modules</span>
</span><span><span style="color: #000000;font-family: Calibri">the zips get downloaded to ls <span style="color: #0000ff">/opt/microsoft/dsc/module_packages</span></span></span><span style="color: #0000ff"><span style="font-family: Calibri"> </span></span>

<span><span style="color: #000000;font-family: Calibri">getDscConfiguration is a Python script,  run from
</span><span style="color: #0000ff">/opt/microsoft/dsc/Scripts</span></span>

<span><span style="color: #000000;font-family: Calibri">sudo <span style="color: #0000ff">/opt/microsoft/dsc/Scripts/GetDscConfiguration.py</span></span></span><span style="color: #0000ff"><span style="font-family: Calibri"> </span></span>

<span><span style="color: #000000;font-family: Calibri">see also:
</span></span><span><span style="color: #000000;font-family: Calibri">sudo ./GetDscConfiguration.py
</span></span><span><span style="color: #000000;font-family: Calibri">sudo ./TestDscConfiguration.py
</span></span><span><span style="color: #000000;font-family: Calibri">sudo ./SetDscLocalConfigurationManager.py
</span></span><span><span style="color: #000000;font-family: Calibri">sudo ./RestoreConfiguration.py
</span></span><span><span style="color: #000000;font-family: Calibri">sudo ./PerformRequiredConfigurationChecks.py
</span></span><span><span style="color: #000000;font-family: Calibri">sudo ./InstallModule.py</span></span>

&nbsp;]]></content:encoded>
    </item>
  </channel>
</rss>