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
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" | |
) |
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
#Check BitLocker prerequisites | |
$TPMNotEnabled = Get-WmiObject win32_tpm -Namespace root\cimv2\security\microsofttpm | where {$_.IsEnabled_InitialValue -eq $false} -ErrorAction SilentlyContinue | |
$TPMEnabled = Get-WmiObject win32_tpm -Namespace root\cimv2\security\microsofttpm | where {$_.IsEnabled_InitialValue -eq $true} -ErrorAction SilentlyContinue | |
$WindowsVer = Get-WmiObject -Query 'select * from Win32_OperatingSystem where (Version like "6.2%" or Version like "6.3%" or Version like "10.0%") and ProductType = "1"' -ErrorAction SilentlyContinue | |
$BitLockerReadyDrive = Get-BitLockerVolume -MountPoint $env:SystemDrive -ErrorAction SilentlyContinue | |
$BitLockerDecrypted = Get-BitLockerVolume -MountPoint $env:SystemDrive | where {$_.VolumeStatus -eq "FullyDecrypted"} -ErrorAction SilentlyContinue | |
$BLVS = Get-BitLockerVolume | Where-Object {$_.KeyProtector | Where-Object {$_.KeyProtectorType -eq 'RecoveryPassword'}} -ErrorAction SilentlyContinue | |
#Step 1 - Check if TPM is enabled and initialise if required |
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
--- | |
- name: Create | |
hosts: localhost | |
connection: local | |
gather_facts: false | |
vars: | |
resource_group_name: ansible-dev-win2019-yourinitials | |
virtual_network_resource_group_name: ansible-dev-yourinitials | |
virtual_network_name: ansible-dev-yourinitials |
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
resource "azurerm_policy_set_definition" "example" { | |
name = "foundations" | |
policy_type = "Custom" | |
display_name = "Foundations" | |
description = "Contains built-in policies for Foundations" | |
metadata = jsonencode({ category = "Custom", version = "1.0.0", source = "Terraform" }) | |
dynamic "policy_definition_reference" { #built-in policies without parameter_values | |
for_each = data.azurerm_policy_definition.builtin_policies_foundations |
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
param( | |
[string]$workspaceId, | |
[string]$workspaceKey | |
) | |
$mma = New-Object -ComObject 'AgentConfigManager.MgmtSvcCfg' | |
if ($mma.GetCloudWorkspace($workspaceId).workspaceid -ne $workspaceId) | |
{ | |
$mma.AddCloudWorkspace($workspaceId, $workspaceKey) |
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
targetScope = 'resourceGroup' | |
// PARAMETERS | |
param actionGroupName string | |
param actionGroupEnabled bool | |
param actionGroupShortName string | |
param actionGroupEmailName string | |
param actionGroupEmail string | |
param actionGroupAlertSchema bool |
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
targetScope = 'subscription' | |
// PARAMETERS | |
param bicepExampleInitiativeId string | |
param assignmentIdentityLocation string | |
param assignmentEnforcementMode string | |
// RESOURCES | |
resource bicepExampleAssignment 'Microsoft.Authorization/policyAssignments@2020-09-01' = { | |
name: 'bicepExampleAssignment' |
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
targetScope = 'subscription' | |
// PARAMETERS | |
param actionGroupName string | |
param actionGroupRG string | |
param actionGroupId string | |
param metricAlertResourceNamespace string | |
param metricAlertName string | |
param metricAlertDimension1 string | |
param metricAlertDimension2 string |
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
targetScope = 'subscription' | |
// PARAMETERS | |
param resourceGroupName string = 'BicepExampleRG' | |
param resourceGrouplocation string = 'australiaeast' | |
param actionGroupName string = 'BicepExampleAG' | |
param actionGroupEnabled bool = true | |
param actionGroupShortName string = 'bicepag' | |
param actionGroupEmailName string = 'jloudon' | |
param actionGroupEmail string = 'jesse.loudon@lab3.com.au' |
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
#!/bin/bash | |
# This file should be sourced | |
# Change directory to user home | |
cd /home/ansibleadmin | |
# Upgrade all packages that have available updates and remove old ones. | |
sudo apt-get update | |
sudo apt upgrade -y | |
sudo apt autoremove --assume-yes |
NewerOlder