Skip to content

Instantly share code, notes, and snippets.

View SevenLayerJedi's full-sized avatar

Keith Smith SevenLayerJedi

  • CO
View GitHub Profile
# Commands to allow/disallow through Windows Firewall
# NETSH
netsh firewall set service type = remotedesktop mode = enable
# Registry
REG ADD "HKLM\SYSTEM\CurrentControlSet\Control\Terminal Server" /v fDenyTSConnections /t REG_DWORD /d 0 /f
# PowerShell
$FireWall = New-Object -comObject HNetCfg.FwPolicy2
# CMD
ver
# .Net Library - OSVersion property of the System.Environment class
[System.Environment]::OSVersion.Version
# .Net Library - OSVersion property of the Environment class
[Environment]::OSVersion
# Check Registry