I’ve put together a PowerShell deinstall script for Oracle clients that I’m dubbing the Ultimate Oracle Client Deinstaller. This deinstall script clears relevant environment variables and creates a .RSP file using Oracle’s deinstall.bat utility. It then deinstalls the Oracle client and cleans up the registry. But wait, there’s more! This script is compatible with Oracle…
Author: paytonflint
PowerShell – Set AD Security Group Membership
Here’s a script that I wrote to allow you to provide a list of machine names and set the membership of an Active Directory security group. It outputs the initial membership count to the console, removes devices that are not present in the provided list, adds devices that are not already present, and then outputs…
Homelab – Virtual Network Configuration
In my home lab environment, I find it convenient (most of the time) for my devices to be able to communicate with one another unimpeded. Doing so allows for simple file transfer, to use RDP, or to ping virtual devices. Often these capabilities are not a necessity, but they do make things convenient. And, in…
PowerShell- Clearing Nullified Environment Variables
I have posted before on the nuances of handling environment variables with PowerShell. I recently encountered an issue where I found a shortcoming of some of my previous scripting work. I was unable to clear nullified environment variables in my current session. I can’t take credit for the script I pieced together to accomplish this,…
Homelab- Active Office Cooling
Earlier this year, I rewired my basement to create individual circuits for my garage and office. Before, the entire basement (including the garage) was all on one circuit. I decided I was tired of having my network go down every time I would trip a breaker in the garage – which, admittedly, happens all too…
Fix “SQL Availability Replica Disconnected”
If you are using Always On Availability Groups in SQL, you may encounter connectivity issues between nodes if there has been a change in configuration of the nodes. When I encountered this issue, the nodes in question had been transitioned from a commercial firewall application to Windows Defender Firewall, and traffic was not being allowed…
Generate Email List From CM Primary User Data
Let’s say you want to perform an ad-hoc test deployment. You build a small test collection and go to deploy, but wait – you ought to do your due diligence and notify the primary users of the targeted devices, right? You highlight primary user data in the console and attempt to copy it to a…
Parallel vs. Serial Execution – Improving PowerShell Script Performance
If you often use scripts utilizing Foreach loops, you’re going to want to read this. Serial execution of this sort of loop is commonplace. But, did you know, by utilizing workflows, you can execute a Foreach loop in parallel? By doing so, we can drastically reduce the execution time of a script because each item…
WQL Query Optimization & Collection Evaluation Run Time
As an engineer working with CM, it is likely you will find yourself running SQL reports to identify collections that may potentially be utilizing sub-optimal query-based membership rules. If these queries have been poorly written, it can waste valuable system resources. If you modify and optimize these queries, it would behoove you to validate (and…
Scripted Restart of Service – Azure Update Management
If you are using Update Management to handle patching of Windows VMs in Azure, you are bound to see devices display in the “Not Assessed” compliance state from time to time. To remedy this, one can restart the service “Microsoft Monitoring Agent (HealthService).” This service has a corresponding process as well, and I check the…