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

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

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

Query Domain OU and Identify Physical/Virtual Servers

This Powershell script can help identify whether servers in Active Directory are virtual or physical. Create a new Powershell script file named Get-Physical.ps1 with below contents. $serverList = Read-Host -Prompt "Specify OU Distinguished name: (eg. OU=Normal Services - 2008 Servers,OU=Servers,DC=CONTOSO,DC=LOCAL"; #Generates servers.txt file from above input query, searching and generating list of servers within OU. … Continue reading Query Domain OU and Identify Physical/Virtual Servers

Identify failed logon desktop or device

Enable verbose user account logging in order to determine where failed authentication attempts are originating from. Log into primary domain controller. Enable verbose netlogon logs using command nltest /dbflag:0x2080ffff This will enable us to pinpoint which device these failure authentications are originating from. Log file: %windir%\debug\netlogon.log Once log has been accumulated sufficiently, disable verbose login … Continue reading Identify failed logon desktop or device

Windows Server 2012 – Get Folder Size Statistics

Here is a PowerShell function helpful in populating statistics of sub-folder sizes. Create a PS1 file named Get-FolderSize.ps1 with the following contents: Function Get-FolderSize {  BEGIN{$fso = New-Object -comobject Scripting.FileSystemObject}  PROCESS     {     $path = $input.fullname     $folder = $fso.GetFolder($path)     $size = $folder.size     [PSCustomObject]@{‘Name’ = $path;’Size’ = ($size / 1gb) }     } … Continue reading Windows Server 2012 – Get Folder Size Statistics