Skip to content

Instantly share code, notes, and snippets.

View d0gkiller87's full-sized avatar

d0gkiller87 d0gkiller87

  • de_dust2
View GitHub Profile
@d0gkiller87
d0gkiller87 / TabCompletionForwardSlash.md
Last active July 11, 2024 15:37
Forward slashes instead of backslashes in PowerShell's tab completion!

Installation

Copy the TabExpansion2() function to your $profile file

Description

A modified version of Thotaz's answer that changes PowerShell's auto completion behavior to act like bash

Features

  • Replaces backslashes to forward slashes
  • Replaces trailing backslashes at the end of directories to forward slashes
  • Removes ./ or .\ if the completion took place in the 2nd or later arguments
@d0gkiller87
d0gkiller87 / wifibackup.ps1
Created August 3, 2024 20:47
PowerShell script to backup & restore Wi-Fi profiles on Windows using `netsh wlan`
# PowerShell Script to Backup and Restore Wi-Fi Profiles
chcp 65001
# Backup Wi-Fi Profiles
$BackupFolder = "profiles"
function Backup-WifiProfiles {
if (-Not (Test-Path $BackupFolder)) {
New-Item -ItemType Directory -Path $BackupFolder -Force
}