Skip to content

Instantly share code, notes, and snippets.

{
"$schema": "http://columnformatting.sharepointpnp.com/columnFormattingSchema.json",
"debugMode": true,
"elmType": "div",
"txtContent": "@currentField",
"style": {
"background-color": {
"operator": "?",
"operands": [
{
{
"$schema": {
"description": "schema of the JSON",
},
"debugMode": {
"description": "Is this JSON in debug mode?",
},
"elmType": {
"description": "The type of element to create",
},
{
"$schema": "http://columnformatting.sharepointpnp.com/columnFormattingSchema.json",
"debugMode": true,
"elmType": "div",
"txtContent": "@currentField",
"style": {
"background-color": "blue",
"color": "white",
"padding-left": "10px"
}
@mrik23
mrik23 / boxstarter1.txt
Created September 14, 2017 06:12
Test Boxstarter
choco install googlechrome
choco install firefox
choco install jre8
choco install flashplayerplugin
choco install 7zip.install
choco install notepadplusplus.install
choco install vlc
choco install paint.net
@mrik23
mrik23 / AzureRM-ChangeVMOSDiskHostCaching.ps1
Last active August 6, 2017 02:57
PowerShell snippet to change the Host Caching option for the OS disk of an existing VM in Azure RM.
#Requires Azure PowerShell v2
#Check documentation https://docs.microsoft.com/en-us/powershell/azure/active-directory/install-adv2?view=azureadps-2.0
#Make sure AzureRM module is installed and loaded
Import-Module AzureRM
#Connect to Azure
Login-AzureRmAccount
#Get the current VM config
@mrik23
mrik23 / AzureRM-RegisterServiceProvider.ps1
Created August 5, 2017 04:59
A simple PowerShell script using Azure PowerShell to check the registration of a service provider and register it.
#Azure PowerShell v2
#Check documentation https://docs.microsoft.com/en-us/powershell/azure/active-directory/install-adv2?view=azureadps-2.0
Import-Module AzureRM
$credential = Get-Credential
Login-AzureRmAccount -Credential $credential
#List all resource providers enabled
Get-AzureRmResourceProvider -ListAvailable | format-table
@mrik23
mrik23 / deployarmtemplate.sh
Created July 2, 2017 15:27
Deploy ARM template with Azure CLI 2.0
# Connect to Azure
az login
# Create resource group if necessary
az group create --name MyResourceGroup --location "Central US"
# Deploy the template to the defined resource group
az group deployment create \
--name DeploymentFromCLI \
--resource-group MyResourceGroup \
@mrik23
mrik23 / deployarmtemplate.ps1
Created July 2, 2017 15:12
Deploy ARM template with PowerShell
#Connect to Azure
Login-AzureRmAccount
#Create a new resource group is necessary
New-AzureRmResourceGroup -Name MyResourceGroup -Location "East US"
#Deploy the template in the defined Resource Group
New-AzureRmResourceGroupDeployment -Name ExampleDeployment -ResourceGroupName MyResourceGroup `
-TemplateFile c:\projects\templates\azuredeploy.json `
-Verbose
@mrik23
mrik23 / arm_template_with_functions_2.json
Last active July 2, 2017 13:47
Example ARM template with functions 2
{
"$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
"contentVersion": "1.0.0.0",
"parameters": {
"storageAccountType": {
"type": "string"
}
},
"variables": {
"storageAccountName": "[concat('sa', uniquestring(resourceGroup().id))]"
@mrik23
mrik23 / arm_template_with_functions.json
Last active July 2, 2017 11:50
Example ARM Template with functions
{
"$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
"contentVersion": "1.0.0.0",
"resources": [
{
"apiVersion": "2016-01-01",
"type": "Microsoft.Storage/storageAccounts",
"name": "[concat('storage', copyIndex(), uniqueString(resourceGroup().id))]",
"location": "[resourceGroup().location]",
"sku": {