This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Turn adaptive contrast on - default | |
$value = '9240' | |
New-ItemProperty -Path 'HKLM:\SYSTEM\ControlSet001\Control\Class\{4d36e968-e325-11ce-bfc1-08002be10318}\0001' ` | |
-Name 'FeatureTestControl' -PropertyType DWORD -Value $value -Force | |
# Turn adaptive contrast off | |
$value = '9250' | |
New-ItemProperty -Path 'HKLM:\SYSTEM\ControlSet001\Control\Class\{4d36e968-e325-11ce-bfc1-08002be10318}\0001' ` | |
-Name 'FeatureTestControl' -PropertyType DWORD -Value $value -Force |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# -------------------------------------------------------------------------------------------------------------- | |
# | |
# Title : Azure_VMs_Inventory_V1.0 | |
# Programmed by : Mark Ayre & Marc Kean | |
# Date : December, 2017 | |
# | |
# -------------------------------------------------------------------------------------------------------------- | |
# | |
# Script to inventory the VM's (both ASM and ARM based) against all Azure subscriptions the account has access to. | |
# Adapted from Azure Inventory.ps1 by Marc Kean: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
### Log into Azure ARM | |
Login-AzureRmAccount | |
### Choose subscription 'new' Azure | |
$subscription = (Get-AzureRmSubscription | Out-GridView -Title "Select the Azure subscription that you want to use ..." -PassThru).SubscriptionName | |
Select-AzureRmSubscription -SubscriptionName $subscription | |
Import-Module "C:\Program Files (x86)\Microsoft SDKs\Azure\PowerShell\ResourceManager\AzureResourceManager\AzureRM.Network\AzureRM.Network.psd1" | |
########################################################################## |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$PreferredSSID = $null # otherwise change this to '$PreferredSSID = 'My SSID'. If $null, it will connect to an available known WiFi network | |
function Get-WifiNetwork { | |
end { | |
netsh wlan show networks mode=bssid | % -process { | |
if ($_ -match '^SSID (\d+) : (.*)$') { | |
$current = @{} | |
$networks += $current | |
$current.Index = $matches[1].trim() | |
$current.SSID = $matches[2].trim() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Written with Azure PowerShell module v6.1.0 available from https://github.com/Azure/azure-powershell/releases/tag/v6.1.0-May2018 | |
# Recently tested fully with a later version of the Azure PowerShell module - Install-Module AzureRM -RequiredVersion 6.1.0 | |
###################### | |
############## Step 0: Change Variables, and logon | |
###################### | |
# Define Azure Automation Assets | |
$AutomationAppIDName = 'AutomationAppId' # Feel free to change to suit you | |
$AutomationTenantIDName = 'AutomationTenantId' # Feel free to change to suit you |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<# | |
Written with version 2.8.0 of the Azure PowerShell Module | |
available from here https://github.com/Azure/azure-powershell/releases/tag/v2.8.0-October2019 | |
or run: Install-Module -Name Az -RequiredVersion 2.6.0 -AllowClobber | |
Migration instructions Azure.RM to Az - https://azure.microsoft.com/en-au/blog/how-to-migrate-from-azurerm-to-az-in-azure-powershell/ | |
#> | |
# from https://poshtools.com/2018/04/10/cross-platform-out-gridview-using-universal-dashboard/ | |
function Out-GridView | |
{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# -------------------------------------------------------------------------------------------------------------- | |
# | |
# Title : Azure - Azure VM enable guest level monitoring | |
# Written by : Marc Kean | |
# Date : December, 2017 | |
# | |
# -------------------------------------------------------------------------------------------------------------- | |
# | |
# Script to turn on guest OS level monitoring across all VMs in a subscription. This will work its way through all | |
# ARM based Azure VMs one by one. VMs need to be turned on, otherwise they can't be enabled. Run again over and over |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$downloadlocation = "$env:USERPROFILE\downloads\BenLiam" | |
if(!(Test-Path $downloadlocation)) {New-Item -Path $downloadlocation -ItemType Directory} | |
# Get all the podcasts | |
$CompletePodcasts = @() | |
$page = 1 | |
do { | |
$URL = "https://www.novafm.com.au/wp-json/nova/v1/infinite-scroll-posts?query_name=episodes&post_type=episode&meta_key=podcast_319425&paged=$page&__amp_source_origin=https%3A%2F%2Fwww.novafm.com.au" | |
$result1 = Invoke-WebRequest -Uri $URL | ConvertFrom-Json | |
if($result1){ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Logon to Azure ARM | |
$Azure = Get-AzureRmEnvironment 'AzureCloud' | |
$Env = Login-AzureRmAccount -Environment $Azure -Verbose | |
# Select Subscription | |
Select-AzureRmProfile -Profile $Env | |
$Subscription = (Get-AzureRmSubscription | Out-GridView -Title "Choose a Source Subscription ..." -PassThru) | |
# Select Subscription Function | |
Function Subscription { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#region Install Modules | |
# Run as Administrator | |
#Find-Module AzureServicePrincipalAccount | Install-Module | |
#endregion | |
$APIResourceURI = 'https://management.core.windows.net/' # Some cases use 'https://api.loganalytics.io' | |
# Retrieve Azure Module properties |