Skip to content

Instantly share code, notes, and snippets.

View asheroto's full-sized avatar
😎

asheroto

😎
  • United States
View GitHub Profile
@asheroto
asheroto / RunWithPowerShell7.reg
Last active October 30, 2025 01:19
Add "Run with PowerShell 7" to the context menu of PS1 scripts.
Windows Registry Editor Version 5.00
[HKEY_CLASSES_ROOT\SystemFileAssociations\.ps1]
[HKEY_CLASSES_ROOT\SystemFileAssociations\.ps1\Shell]
[HKEY_CLASSES_ROOT\SystemFileAssociations\.ps1\Shell\Edit]
"NoSmartScreen"=""
[HKEY_CLASSES_ROOT\SystemFileAssociations\.ps1\Shell\Edit\Command]
@asheroto
asheroto / Disable Hyperlinks for Specific Domain in Outlook.md
Last active March 7, 2022 05:11
This is an Outlook macro that will disable hyperlinks for a specific sender domain. The example disables hyperlinks for e-mails from ebay.com, but of course you can change it to anything you'd like.
@asheroto
asheroto / Remove-Duplicate-Entries-From-Path-Variables.ps1
Last active May 17, 2026 18:16
PowerShell script to remove duplicate entries from PATH environmental variables in Windows.
Clear-Host;
# Begin
Write-Output "⏲️⏲️⏲️ Starting ⏲️⏲️⏲️"
Write-Output ("-" * 50)
Write-Output ""
# System PATH
Write-Output "🖥️ Checking System PATH 🖥️"
$TempMachinePath = [System.Environment]::GetEnvironmentVariable("Path", "Machine");
@asheroto
asheroto / CustomProtocol.ps1
Created December 24, 2021 03:53
PowerShell script to configure a custom protocol in Windows.
# Custom Protocol
#
# Description:
# Creates a new custom protocol in Windows
#
# Note:
# Be sure to change the variables before running!
#
# Author: asheroto
# Author GitHub: https://github.com/asheroto
@asheroto
asheroto / TacticalRMM One-Line Agent Deployer.md
Last active October 30, 2025 01:39
Creates a one-line command to download and install a TacticalRMM agent.

TacticalRMM One-Line Agent Deployer

Creates a one-line command to download and install a TacticalRMM agent. It works by creating a script and converting it into a base64 command. It then copies the command to your clipboard, so you can paste it / save it as needed.

It also adds a temporary exclusion in Windows Defender to ensure the agent installs without any false positives. The exclusion is removed after the agent download is deleted.

Example

example

@asheroto
asheroto / Extract-IP-Addresses-and-Count.ps1
Last active July 7, 2024 00:40
PowerShell script to extract IP addressees from a file and count the number of occurrences of each IP address.
function ExtractIPaddressesAndCount {
[CmdletBinding()]
param(
[Parameter(Position = 0, mandatory = $true)]
[string] $InputFile,
[Parameter(Position = 1, mandatory = $true)]
[string] $OutputFile
)
If (-Not(Test-Path -Path $InputFile -PathType Leaf)) {
@asheroto
asheroto / play-sound.ps1
Last active February 28, 2026 22:13 — forked from murven/play-sound.ps1
Play sound in PowerShell
# Native sound player (wav only)
$player = New-Object System.Media.SoundPlayer "$env:windir\Media\notify.wav"
$player.Play()
@asheroto
asheroto / Access-Work-or-School-Grayed-Out-Fix.md
Last active January 9, 2022 12:07
Windows 10 Accounts - Your Info - Sign-In Options - Email & Accounts - Access work or school - Settings Grayed Out Fix

Check the subkeys under

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\PolicyManager\default\Settings

and for each one, set the value of the "value" DWORD to 1 to allow access or 0 to deny access.

@asheroto
asheroto / FixSLNicon.md
Last active August 29, 2021 09:14
Fix .sln file icon (Visual Studio) if it is wrong/broken/blank in Windows Explorer
  1. Open regedit
  2. Delete the key HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\FileExts\.sln
  3. Delete the key HKEY_CLASSES_ROOT\.sln
  4. Right-click an sln file and click Open With
  5. Click More Apps, then Look for another app
  6. Specify the path to VSLauncher: C:\Program Files (x86)\Common Files\Microsoft Shared\MSEnv\VSLauncher.exe
@asheroto
asheroto / Batch-File-Check-Administrator.cmd
Last active June 7, 2021 12:35
Confirms if you are running the BAT/CMD script as administrator and prompts you to do so if not.
@echo off
:: Confirm running as administrator
fltmc >nul 2>&1 || (
echo This batch script requires administrator privileges. Right-click on
echo the script and select "Run as Administrator".
goto :die
)
:: Your code starts here