Skip to content

Instantly share code, notes, and snippets.

@mmckechney
mmckechney / Manage-App-Service-Plan.md
Last active October 17, 2023 23:16
PowerShell and CLI to manage App Service Plan sizing

Manage App Service Plan count and SKU

Get the number of worker nodes serving the app service plan

(Get-AzAppServicePlan -ResourceGroupName "<resource group name>" -Name "<app service plan name>").Sku.Capacity
@mmckechney
mmckechney / Readme.md
Last active April 10, 2020 12:26
Collect Storage Account Usage Metrics

Intro:

This PowerShell script will collect usage information on all of the storage accounts you have access to as well as getting their location and SKU. It will output in a table format

How to use

First, you will need to install the ARMClient.exe application. This is what makes the REST calls to the the metrics APIs.

@mmckechney
mmckechney / Get-AllVMPowerState.ps1
Created May 1, 2020 20:13
Display Power State for all VMs
$vmInfo = @()
class vmdata {
[string]$subscription
[string]$resourceGroupName
[string]$Name
[string]$Location
[string]$Size
[string]$OS
[string]$PowerState
using System.CommandLine;
using System.CommandLine.Builder;
using System.CommandLine.Help;
using System.CommandLine.NamingConventionBinder;
namespace SysCmdLine
{
class Program
{
public static void Main(string[] args)
@mmckechney
mmckechney / kubectl_ubuntu_wsl.sh
Created May 27, 2022 17:18 — forked from cmendible/kubectl_ubuntu_wsl.sh
Install kubectl on ubuntu (WSL) and use kubectl config from Windows
#!/bin/bash
# Receives your Windows username as only parameter.
curl -LO https://storage.googleapis.com/kubernetes-release/release/v1.16.0/bin/linux/amd64/kubectl
chmod +x ./kubectl
sudo mv ./kubectl /usr/local/bin/kubectl
windowsUser=$1
param keyvaultName string
param currentIpAddress string
param identityClientId string
param subNet1Id string
param subNet2Id string
param subNet3Id string
param subNet4Id string
param location string = resourceGroup().location
resource keyVaultResource 'Microsoft.KeyVault/vaults@2019-09-01' = {
param keyvaultName string
param currentIpAddress string
param identityClientId string
param subNet1Id string
param subNet2Id string
param subNet3Id string
param subNet4Id string
param location string = resourceGroup().location
resource keyVaultResource 'Microsoft.KeyVault/vaults@2019-09-01' = {