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…

0

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…

2

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…

1

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…

0

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 }

0