Similar to all other programming languages, Terraform also makes use of variables for dynamic coding. You can have a dedicated Terraform variables file with extension .TFVARS within your working directory/folder and this will automatically be referenced in your main Terraform code file, so you can call directly and/or interpolate. There are several different types of … Continue reading Terraform Variables
Author: Hugo Gungormez
How to run Terraform Code
In this tutorial, we will be executing Terraform code to create a new Azure Resource Group. Prerequisites Microsoft Visual Studio Code. Terraform extension for Microsoft Visual Studio Code. Code for creating a Resource Group resource "azurerm_resource_group" "web_server_rg" { name="web-rg" location="westus2" } Apply Changes Within Microsoft Visual Studio Code; Right-click our TF file. In this example, … Continue reading How to run Terraform Code
How to create an Azure SPN for Terraform
Service Principal Name is effectively a service account within Azure. Required in this scenario for our Terraform Provider function to connect our TF code to our Azure Subscription. Login to https://portal.azure.com. Click into Azure Active Directory. Click App Registrations >+ New registration. Provide a name for your SPN ie. terraform-spn, provide any valid URL within … Continue reading How to create an Azure SPN for Terraform
How to hook Terraform into Azure
You can hook Terraform into Azure with the following requirements: client_id, Azure counterpart is Application ID within AAD directory application. client_secret, Password Keys within AAD directory application. tenant_id, AAD Directory ID. subscription_id, Azure Subscription ID. Once we gather above details, we can then proceed to write our Provider function within our Terraform script. Below … Continue reading How to hook Terraform into Azure
How to increase MBR volume more than 2 TB
Ever encounter a scenario with a Windows VM requiring a disk extension over 2 TB, only to discover it cannot be performed? Don't fret as this is by design; You cannot increase MBR partition style volumes larger than 2 TB. Unfortunately we do not have the choice of converting an MBR partition style volume to … Continue reading How to increase MBR volume more than 2 TB
FSRM Quota Reporting Incorrectly
FSRM can glitch out and report incorrect quota values for directories. In this scenario, we can use the DIRQUOTA command via elevated CMD prompt to resolve. dirquota quota scan /path:<Path> [/remote:<ComputerName>] REF: https://docs.microsoft.com/en-us/previous-versions/windows/it-pro/windows-server-2012-R2-and-2012/cc742101(v=ws.11)
Updating Root Certificates on Windows Server
You may encounter issues on Windows Server when surfing the web, SSL certificates appear to be invalid, even though your locale/region settings and date/time are correct. In this scenario; Generate a root certificate SST file (from a working computer **IMPORTANT**) using the following command certutil.exe -generateSSTFromWU roots.sst Transfer newly generated roots.sst file to affected computer/server … Continue reading Updating Root Certificates on Windows Server
Universal VMware Tools Uninstaller
I've created the following Powershell script which will uninstall all versions of VMware Tools from a server. Particularly handy for SCCM deployment. uninstall_vmware_tools.ps1 $regpath = "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall" $regkey = gci $regpath | Get-ItemProperty | Where-Object{"VMware Tools" -contains $_.DisplayName} #Uninstall String msiexec /x $regkey.PSChildName /qn #Reboot server within 120 seconds. shutdown -r -f -t 120 The … Continue reading Universal VMware Tools Uninstaller
Connect iSCSI Targets with MutualCHAP Authentication using PowerShell
You can connect iSCSI Targets in Windows using PowerShell which is a handy technique for volumes which are encrypted with authentication; As these volumes will not automatically connect at system startup, even if they are within iSCSI Initiator's Favorite Targets. You can create a PowerShell script and configure in Task Scheduler to automatically connect iSCSI … Continue reading Connect iSCSI Targets with MutualCHAP Authentication using PowerShell
Home Folder – Compare folders against current domain users V2
This is version 2 to below Powershell script to query parent directory containing user home folders or profiles. Especially helpful for housekeeping deprecated RDS & Citrix profiles, maximising disk space on your profile file server. Improvements Added error handling with try/catch. Added input for directory path. Added color for deprecated profiles. Removed unnecessary reporting of … Continue reading Home Folder – Compare folders against current domain users V2