Azure – “VMScaleSetCannotReferenceLoadbalancerWhenLargeScaleIsEnabled”

‘VM scale set cannot reference a load balancer when LargeScale property is enabled.’ The error may well leave you as puzzled as I was! There is a checklist of things you require STANDARD not BASIC for the Load-Balancer is the first thing to check.. and you probably need a Standard SKU for your…


Azure – Virtual machine scale set does not support disk encryption

New-AzureRmResourceGroupDeployment : 3:49:21 PM – Resource Microsoft.Compute/virtualMachineScaleSets ‘vmssfp6s’ failed with message ‘{ “error”: { “code”: “NotSupported”, “message”: “Virtual machine scale set does not support disk encryption. Please remove Azure Disk Encryption extension from virtual machine scale set model.” } }’ #Yet I see examples in GitHub – so is it supposed to work? $namespaces=(Get-AzureRMresourceprovider).ProviderNamespace foreach…


Azure – PowerShell Azure locations with zones

#Requires -module AzureRM #find regions that support Zones and what VM SKus are supported function Get-AzureRMlocationZones { PARAM ($location,$ComputeResourceSku) $sku=Get-AzureRmComputeResourceSku | Where-Object {$_.ResourceType -eq ‘virtualMachines’ -and $_.LocationInfo.Zones } if ($location) { $sku = $sku | Where-Object {$_.Locations -eq $location} } if ($ComputeResourceSku) { $sku = $sku | Where-Object {$_.Name -eq $ComputeResourceSku} } $sku } #Get-AzureRMlocationZones…


PowerShell DSC – LocalConfigurationManager cycle behaviour

LCM will start the 15 minute cycle based on: • A new metaconfig is applied using Set-DscLocalConfigurationManager • A machine restart • For any condition where the timer process experiences a crash, that will be detected within 30 seconds and the cycle will be restarted The start time is absolute. This means if an operation begins at T0…


Azure – PowerShell setting Blob Tiers

function Set-AgedBlobsToTier  { PARAM ( [Parameter(Mandatory = $true)] [int] $AgeInDays, [Parameter(Mandatory = $true)] [Microsoft.WindowsAzure.Storage.Blob.Standardblobtier] $StorageTier, [Parameter(Mandatory = $true)] [string]$ResourceGroupName, [Parameter(Mandatory = $true)] [string]$StorageAccountName )    $StorageAccountName = $StorageAccountName.ToLower()      if  (Get-AzureRmStorageAccount -ResourceGroupName $ResourceGroupName -Name $StorageAccountName -EA SilentlyContinue)  { $StorageAccountKeys    = Get-AzureRmStorageAccountKey -ResourceGroupName $ResourceGroupName -Name $StorageAccountName $StorageAccountKey     = $StorageAccountKeys[0].Value $StorageAccountContext = New-AzureStorageContext -StorageAccountName $StorageAccountName -StorageAccountKey…


Windows 10 and “no longer located in”

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. ‘C:\Windows.Old\Users\lukeb\AppData\Local\Packages\Microsoft.Windows.Cortana_cw5n1h2txyewy\LocalState..’ 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…


PowerShell – reinstall Windows 10 Store app

#Reinstall-StoreApp.ps1 #Requires -RunAsAdministrator $Store=Get-Appxpackage -Allusers | Where-Object {$_.PackageFullName -match ‘WindowsStore’} | Sort-Object -Property Version -Descending | Select-Object -First 1 $PackageName=$Store.PackageFullName $StoreManifest = “C:\Program Files\WindowsApps\$PackageName\AppxManifest.xml” if (Test-Path -Path $StoreManifest) { Add-AppxPackage -register $StoreManifest -DisableDevelopmentMode }


PowerShell Azure – Get-AzureExtensionHighestVersion

function Get-AzureExtensionHighestVersion {    [CmdletBinding()]    PARAM ([string]$extension, [string] $location=’AustraliaEast’)     $sortProps = @{Expression = “PublisherName”; Descending = $True}, @{Expression = “Type”; Descending = $True},@{Expression = “Version”; Descending = $True}    $Results= Get-AzureRmVmImagePublisher -Location $location |      Get-AzureRmVMExtensionImageType |       Get-AzureRmVMExtensionImage |        Where-Object {$_.Type -LIKE “*$extension*”}   #replace version…


Azure – DSC automation (Windows vs Linux)

{ “$schema”: “”, “contentVersion”: “”, “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”: “”,…


PowerShell – DSC Linux MOFs and logs

working with DSC on Linux, there are a few things to know that don’t seem to be documented anywhere obvious.  OMI stuff  lives in /opt/omi/lib /opt/omi/bin  For troubleshooting you look at the logs which are here: cat /var/opt/omi/log/omiserver.log         #the OMI CIM server cat /var/opt/omi/log/dsc.log               #the LCM and DSC logging. Start your…