Month: October 2020

PowerShell: Test URL for Reachability

function testUrl($url){ try{ $HTTP_Request = [System.Net.WebRequest]::Create($url) $HTTP_Response = $HTTP_Request.GetResponse() [int]$HTTP_Status = [int]$HTTP_Response.StatusCode If ($HTTP_Status -eq…

PowerShell: 1-Liner to Install Windows Photo Viewer for Windows 10

I've thought that Windows Photo Viewer is a nicely optimized and lightweight program to preview…

Issue: Unable to Access Corp Intranet While Connected to Satellite Office Network VS Can Access When Connected to Corp VPN

Step 1: obtain information from DNS servers differences between VPN vs Non-VPN connections Obtain network…

PowerShell: Rename Photo and Video Files by Adding Creation Dates

Have you ever downloaded a punch of images, MOV, and MP4 from iCloud to find…

PowerShell: Get Date Taken Value of a Photo or Video

This function only deals with photos. Videos, such as MOV files, have an attribute called…

Jenkins: How to Clone a Job

To create a new job, use this quick how-to. This instruction is a quick walk-through…

MAC: Setting Google DNS to Bypass ISP Slower Name Resolution

Open System Preferences > Network > DNS > click + (plus sign) under DNS Servers…

Invoke T-SQL on Multiple Servers

$computersAndCredentials=@{ 'SQL01'=@{'intranet\sql01Admin'='PASSWORD'} 'SQL02'=@{'intranet\sql02Admin'='PASSWORD'} 'SQL03'=@{'intranet\sql03Admin'='PASSWORD'} 'SQL04'=@{'intranet\sql04Admin'='PASSWORD'} } $tSql=" --Update the Setting with a new value: USE…

PowerShell: Get Event Logs from a List of Computers

Windows event logs contain a wealth of information that would be useful for analytical purposes.…

Redirecting Microphone through Remmina RDP Sessions

Update 11/29/2020: the 'redirect local microphone' option is now simply a check-mark on Remmina version…

PowerShell: Find Process ID (PID) Locking a Certain File

Here's a function to kill common processes (Antivirus executable excluded) locking a particular file. This…

Microsoft Dynamics Email Router Failed to Start

Symptoms Event Log: Item 1: highest correlating event ID 26234 #26234 - The Email Router…

PowerShell: Clear Windows Clipboard

Many of us are using Remote Desktop nowadays. As such, clipboard can sometimes be out…

How To Invoke Functions as Background Jobs

Invoke-Command, Start-Job, Multi-Tasking is what good coders should aspire toward. Here, we're looking at some…

PowerShell: Update a List of Multiple Windows Machines

Version 3: # updateWindowsList.ps1 # Version 0.0.3 # # Features: # - New feature over…

PowerShell: Output HashTable to CSV

function outputHashtableToCsv{ param( $hashTable, $csvFile='C:\updateResults.csv', $headers=@('computerName','minutesToUpdate') ) try{ write-host $($hashTable|out-string) if(test-path $csvFile){ rename-item $csvFile "$csvFile.bak"…

PowerShell: Combine Objects

By default, a PowerShell Custom Object cannot be added to another. This would be the…

PowerShell: Check Speculation Controls for Spectre Mitigation Support on Windows

Run the below function to view an output similar to this: BTIHardwarePresent : True ->…