Skip to content

Instantly share code, notes, and snippets.

@michele-tn
michele-tn / SSH_PlinkConnecting.ps1
Last active May 10, 2024 12:18
(MULTIPLE TCP TUNNELING) Connecting and Loading SSH private keys automatically on plink
# Run as administrator and stays in the current directory
if (-Not ([Security.Principal.WindowsPrincipal][Security.Principal.WindowsIdentity]::GetCurrent()).IsInRole([Security.Principal.WindowsBuiltInRole]::Administrator)) {
if ([int](Get-CimInstance -Class Win32_OperatingSystem | Select-Object -ExpandProperty BuildNumber) -ge 6000) {
Start-Process PowerShell -Verb RunAs -ArgumentList "-NoProfile -ExecutionPolicy Bypass -Command `"cd '$pwd'; & '$PSCommandPath';`"";
}
}
[Net.ServicePointManager]::SecurityProtocol = "Tls, Tls11, Tls12, Ssl3"
# Convert from Base64 to EXE
@michele-tn
michele-tn / Gpedit-enabl3r.bat
Created May 7, 2024 16:41
Enable Group Policy Editor (gpedit.msc) on Windows 10/11
pushd "%~dp0"
dir /b %SystemRoot%\servicing\Packages\Microsoft-Windows-GroupPolicy-ClientExtensions-Package~3*.mum >List.txt
dir /b %SystemRoot%\servicing\Packages\Microsoft-Windows-GroupPolicy-ClientTools-Package~3*.mum >>List.txt
for /f %%i in ('findstr /i . List.txt 2^>nul') do dism /online /norestart /add-package:"%SystemRoot%\servicing\Packages\%%i"
pause
@michele-tn
michele-tn / GetRUSTDESKLatestVersion_NIGHTLY.ps1
Created March 21, 2024 10:14
Downloads the latest version of Rustdesk (Nightly or Latest) using the GitHub API web service, configures application by setting the IP and keys of your self-hosted server. Finally, it runs the application you just downloaded. That's all. ;-)
<#
.AUTHOR : MICHELE-TN
.CLIENT DEPLOYMENT : https://rustdesk.com/docs/en/self-host/client-configuration/
: https://rustdesk.com/docs/en/self-host/client-deployment/
.SERVER DEPLOYMENT : https://rustdesk.com/docs/en/self-host/
.Techahold/rustdeskinstall : Easy install Script for Rustdesk
: https://github.com/techahold/rustdeskinstall