Skip to content

Windows 11

Reload PowerShell Profile

. $profile

GPG

winget install GnuPG.GnuPG
git config --global gpg.program "C:\Program Files (x86)\GnuPG\bin\gpg.exe"

Microsoft Store Apps Update

Powershell
Get-CimInstance -Namespace "Root\cimv2\mdm\dmmap" -ClassName "MDM_EnterpriseModernAppManagement_AppManagement01" | Invoke-CimMethod -MethodName UpdateScanMethod

Share USB with WSL

Powershell
winget install --interactive --exact dorssel.usbipd-win
usbipd wsl list
usbipd wsl attach --busid <busid>
usbipd wsl detach --busid <busid>

Copy from WSL

echo "test" | clip.exe

Scoop

iwr -useb get.scoop.sh | iex

Create Empty File

ni .gitkeep

Profile

echo $profile
C:\Users\nicholas\OneDrive\Documents\WindowsPowerShell\Microsoft.PowerShell_profile.ps1
. $profile

Aliases

Copy alias
Copy-Item -Path Alias:ni -Destination Alias:touch

Terminal Paste Multiple Lines Warning

settings.json
{
  "multiLinePasteWarning": false,
}

PowerShell History

cat (Get-PSReadlineOption).HistorySavePath

How to Mount Remote File Systems Over SSH

winget install evsar3.sshfs-win-manager
winget install WinFsp.WinFsp
winget install SSHFS-Win.SSHFS-Win