Posts

Showing posts with the label System Administration

Quick Ansible Overview  —  Remediate Host Configuration Drift (Infrastructure-as-Code)

Image
This introductory article is about Infrastructure-as-Code (IaC) and a major player of which, Ansible , its concepts — control node, managed host, inventory, playbook and modules — along with a quick example using an ansible command to remediate configuration drift of managed computers, so that a specified service on them is running in its desired state. Infrastructure-as-Code DevOps is not a Goal, but a never-ending process of continual improvement. —  Jez Humble It is the era of DevOps, where development (Dev) and operation (Ops) are converged and streamlined for the benefit of the business. On the infrastructure side, it is also desired that managing hosts (mostly servers and workstations) be done in a modern way to fit in the DevOps mindset where everything is defined as code to allow for agility which enables continual improvement. Comes Infrastructure-as-Code automation engines, available as command-line tools which can be leveraged for infrastructure compliance remediation. Such ...

Folder Template Provisioner

Image
For file server admins, this Windows batch script provisions (copies) new folders with exact permissions and content from a specified existing folder (template) based on the information inputted by a user via its command-line interface. It hopes to reduce the burden of Windows admins by handling over the task of folder provisioning to users. It uses  robocopy /MIR /COPYALL /ZB  to solve the problem where folders copied using Windows Explorer (a.k.a. File Explorer) may not retain unique permissions and inherit permissions from parent folder. Go to Download Features Accept input from user First name and last name (feel free to modify them for other use cases where appropriate) Copy a new folder using specified template folder retaining exact permissions and content using  robocopy /MIR /COPYALL  named in  LASTNAME, First Name  format according to user input Support of network-shared folder in UNC form ( \\... ) is available In other words, for drives ...

How-to: Create a Silent Installer with AutoHotkey and Publish it on Chocolatey

Image
Supposed there is a portable Windows application without an installer and uninstaller, how to create them back? In today's post, we will explore one way to build a  Setup.exe  using AutoHotkey (AHK), with additional compression of 7-Zip applied to the  Setup.exe  and remaining files of the portable application for maximum compression, and then wrap it with an outer unattended installer, turning a portable application into an installable one while being suitable also for silent deployment. The application example, i.e. the application for which a setup is created is  AeroZoom . While some terminologies are specific to AeroZoom, the general concepts should apply to other software. // ⭐1️⃣ to be built: outer unattended installer written in AHK AeroZoom_Unattended_Installer.exe │ │ // 2️⃣ to be built: 7-Zip self-extracting archive │ └───AeroZoom_7-Zip_SFX.exe │ ├───AeroZoom // portable app example │ ...

Tip-Packed Gem from Microsoft Ignite 2018 – Windows Life Hacks

Image
I came across this top session, 45 Life Hacks in 45 Minutes, from Microsoft Ignite 2018 which I consider to be a gem to Windows enthusiasts. It is packed with useful Windows techniques, many of which are advanced while practical. This blog post merely summarizes the interesting tips from the session as an entry point – to experience the amazingness of the live demos, please go watch the recorded session on YouTube and look for other works by Sami Laiho from whom I learned a lot. 1. Exit Explorer Windows 10/2016 Right-click taskbar > Exit Explorer Windows 8/2012 Press Alt+F4 to bring up shutdown dialog. Next, while holding Ctrl+Shift+Alt, click Cancel 2. Violate a Group Policy which e.g. only allows running IE, but not Command Prompt or others In Task Manager > Run New Task It always open a Command Prompt 3. Redo old commands from history without typing again F7 hotkey History of Command Prompt or PowerShell 4. Tab auto completi...

ChMac – Windows Command to Change MAC Addresses of Network Adapters

Image
A quick Windows batch CLI tool to change or randomize network adapter MAC address for security, or to work around usage limit of public Wi-Fi hotspots, either auto or manually. The command – chmac – changes MAC address in an easy-to-use interactive console alongside CLI parameters Named after getmac and chmod,  chmac  is a command-line-interface (CLI) tool for Windows that changes or randomizes MAC addresses of specified network adapters, e.g. for a client device to reuse public Wi-Fi hotspot that has exceeded usage limit for the day (e.g. hotel, restaurants), or to enhance security. An easy-to-use interactive console is available, alongside command-line parameters, e.g. for scheduling jobs with Task Scheduler. ChMac also has built-in support for recurrence.  Go to Download Also on Chocolatey:  choco install chmac  / winget:  winget install chmac For a quick start, refer to Examples section below; for screenshots, refer to Sc...