Skip to content

Instantly share code, notes, and snippets.

Avatar
🏠
Working from home + Azure policy dev

Just another Azure guy jesseloudon

🏠
Working from home + Azure policy dev
View GitHub Profile
@jesseloudon
jesseloudon / ConfigureTeamsDesktopSettings.ps1
Last active Oct 22, 2020
Example #1 - PowerShell script to configure Microsoft Teams desktop settings. Useful to run via GPO targeting AD users.
View ConfigureTeamsDesktopSettings.ps1
param(
# Define parameters and values
[string]$newWebLanguage="en-au",
[string]$desktopConfigFile=$env:userprofile\\AppData\Roaming\Microsoft\Teams\desktop-config.json”,
[string]$cookieFile="$env:userprofile\\AppData\Roaming\Microsoft\teams\Cookies",
[string]$registryPath="HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall",
[string]$registryDisplayName="Microsoft Teams",
[string]$processName="Teams"
)
@jesseloudon
jesseloudon / ConfigureTeamsDesktopSettings.ps1
Created Oct 22, 2020
Example #2 - PowerShell script to configure Microsoft Teams desktop settings. Useful to run via GPO targeting AD users.
View ConfigureTeamsDesktopSettings.ps1
param(
# Define parameters and values
[string]$newWebLanguage="en-au",
[bool]$newDisableGpu=$true,
[string]$desktopConfigFile=$env:userprofile\\AppData\Roaming\Microsoft\Teams\desktop-config.json”,
[string]$cookieFile="$env:userprofile\\AppData\Roaming\Microsoft\teams\Cookies",
[string]$registryPath="HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall",
[string]$registryDisplayName="Microsoft Teams",
[string]$processName="Teams"
)
@jesseloudon
jesseloudon / azurerm-policyset-multiplepolicies-multipleparameters-example.tf
Created Oct 14, 2020
Example of passing multiple array parameters to an AzureRM policyset resource with multiple policies
View azurerm-policyset-multiplepolicies-multipleparameters-example.tf
terraform {
required_version = "~> 0.13.0"
required_providers {
azurerm = {
source = "hashicorp/azurerm"
version = "~> 2.29.0"
}
}
}
@jesseloudon
jesseloudon / azurerm-policyset-parameter-example.tf
Created Oct 14, 2020
Example of passing array parameter to AzureRM policyset resource
View azurerm-policyset-parameter-example.tf
terraform {
required_version = "~> 0.13.0"
required_providers {
azurerm = {
source = "hashicorp/azurerm"
version = "~> 2.29.0"
}
}
}
@jesseloudon
jesseloudon / ubuntu-setup-ansible.sh
Created Sep 7, 2020
Ubuntu Ansible Setup Script
View ubuntu-setup-ansible.sh
#!/bin/bash
# Update all packages that have available updates.
sudo apt-get update
sudo apt upgrade -y
# Install ansible developer requirements
pip3 install wheel --quiet
pip3 install pywinrm --quiet
pip3 install requests --quiet
@jesseloudon
jesseloudon / ansible-setup-azcli.sh
Created Sep 1, 2020
Ansible setup AzureCLI auth
View ansible-setup-azcli.sh
# install the Azure CLI to your Ansible control host to authenticate to Azure
curl -sL https://aka.ms/InstallAzureCLIDeb | sudo bash
# authenticate and set the desired subscription context
az login
az account list
az subscription set -s SUBSCRIPTIONID
@jesseloudon
jesseloudon / molecule-init-scenario-azure.sh
Created Sep 1, 2020
Molecule initialize new scenario using Azure driver
View molecule-init-scenario-azure.sh
# Initialize new molecule scenario using Azure driver
molecule init scenario rhel8 -d azure
# List molecule scenarios
molecule list
@jesseloudon
jesseloudon / molecule-init-role-azure.sh
Last active Sep 1, 2020
Molecule initialize new Ansible role using Azure driver
View molecule-init-role-azure.sh
# List available molecule drivers
molecule drivers
# Initialize a new molecule role using azure driver
molecule init role ansible-role-exampleApp -d azure
@jesseloudon
jesseloudon / setup.sh
Created Sep 1, 2020
Ansible / Molecule Azure setup
View setup.sh
# Install ansible azure modules
pip install 'ansible[azure]'
# Install molecule azure driver
pip install molecule-azure
@jesseloudon
jesseloudon / molecule.yml
Created Sep 1, 2020
Molecule Azure WindowsOS molecule.yml example 2/2
View molecule.yml
---
lint: |
ansible-lint tasks/main.yml
dependency:
name: galaxy
driver:
name: azure
platforms:
- name: win2019
provisioner:
You can’t perform that action at this time.