This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# WSUS Driver Cleanup | |
## aka you synced the drivers to WSUS and now the database is fucked | |
1. If you can: decline all driver updates and run WSUS cleanup job, via the WSUS management console. | |
2. Connect to the Windows Internal Database named pipe via SQL Server Management Studio | |
a. Right-click and run SSMS as Administrator | |
b. Use this named pipe to connect: np:\\.\pipe\MICROSOFT##WID\tsql\query | |
3. Run all of these delete queries against the database, one-by-one to check for errors before running the next: | |
a. delete from tbrevisionlanguage where revisionid in (select revisionid from tbRevision where LocalUpdateId in (select LocalUpdateId from tbUpdate where UpdateTypeID = 'D2CB599A-FA9F-4AE9-B346-94AD54EE0629')); | |
delete from tbProperty where revisionid in (select revisionid from tbRevision where LocalUpdateId in (select LocalUpdateId from tbUpdate where UpdateTypeID = 'D2CB599A-FA9F-4AE9-B346-94AD54EE0629')); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<# | |
.SYNOPSIS | |
Scans one or more folders for potential duplicate files using filename similarity, fuzzy content hashing, or both. | |
.DESCRIPTION | |
This script compares files using two techniques: | |
• Filename similarity using the Levenshtein distance algorithm (ignores file extensions) | |
• Fuzzy content similarity using Context-Triggered Piecewise Hashing (CTPH) via ssdeep |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! # | |
# This is hard coded for Chicago servers only # | |
# !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! # | |
# Directory containing WireGuard conf files | |
WG_DIR="/etc/wireguard" | |
# IP address to ping for connectivity checks | |
PING_IP="8.8.8.8" | |
# Time interval between pings (in seconds) | |
PING_INTERVAL=30 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Private Function SingleDNSLookup(hostName As String) As String | |
' Check for empty or whitespace-only hostname first | |
If Trim(hostName) = "" Then | |
SingleDNSLookup = "" | |
Exit Function | |
End If | |
Dim wsh As Object | |
Dim psCommand As String | |
Dim result As String |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<# | |
.SYNOPSIS | |
Performs automated RMAN (Recovery Manager) backups of Oracle databases with comprehensive logging and monitoring. | |
.DESCRIPTION | |
This script automates Oracle RMAN backup operations with enhanced logging capabilities. It performs | |
either full (level 0) or incremental (level 1) backups based on the day of the week, with full | |
backups scheduled for Sundays. Features include: | |
- Detailed logging with separate files for general and detailed logs | |
- Process monitoring and resource usage tracking |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<# | |
.SYNOPSIS | |
This PowerShell script retrieves all active Veeam services along with their dependencies and handles their status updates. | |
It then processes each service in reverse dependency order to stop them gracefully, ensuring dependencies are handled correctly. | |
The script also provides real-time status updates for all services. | |
.DESCRIPTION | |
The script includes the following functions: | |
- `Get-VeeamServicesWithDependencies`: Retrieves all Veeam services that are not stopped or disabled, along with their dependencies. | |
- `Get-ServiceDependencies`: Returns the active dependent services for a given service. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<# | |
.SYNOPSIS | |
This PowerShell script converts an .eml email file to a .msg format, preserving email metadata such as sender, recipients (To, CC, BCC), subject, and body (text and HTML), as well as attachments. | |
.DESCRIPTION | |
The script opens a dialog for the user to select an .eml file, reads the email using MimeKit, and converts it to a .msg format using the MsgKit library. | |
The script ensures that all major email components, including attachments, are properly transferred. This script requires PowerShell 7 or later. | |
.PARAMETER EML File | |
The input .eml email file to be converted. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import json | |
import requests | |
from time import sleep | |
from influxdb_client import InfluxDBClient | |
from influxdb_client.client.write_api import SYNCHRONOUS | |
import os | |
import urllib3 | |
# Disable SSL warnings | |
urllib3.disable_warnings(urllib3.exceptions.InsecureRequestWarning) |