Skip to content

Instantly share code, notes, and snippets.

View PhilippHeuer's full-sized avatar

Philipp Heuer PhilippHeuer

View GitHub Profile
@PhilippHeuer
PhilippHeuer / winrm.ps1
Last active August 31, 2025 16:04
enable powershell remoting
# =========================
# Enable PowerShell Remoting (HTTPS only, LocalSubnet restricted)
# powershell -ExecutionPolicy Bypass -File .\winrm.ps1
# =========================
# User-configurable variables
$allowLocalUsers = $false # Set to $true to enable local accounts via WinRM
# Ensure script is running as Administrator
if (-not ([Security.Principal.WindowsPrincipal] [Security.Principal.WindowsIdentity]::GetCurrent()).IsInRole([Security.Principal.WindowsBuiltInRole] "Administrator")) {