diff --git a/portlist/portlist_windows.go b/portlist/portlist_windows.go index 1d38fe5e9..ee6e6cf14 100644 --- a/portlist/portlist_windows.go +++ b/portlist/portlist_windows.go @@ -8,6 +8,7 @@ import ( "syscall" "time" + "golang.org/x/sys/windows" exec "tailscale.com/tempfork/osexec" ) @@ -19,6 +20,9 @@ func listPorts() (List, error) { } func addProcesses(pl []Port) ([]Port, error) { + if t := windows.GetCurrentProcessToken(); !t.IsElevated() { + return listPortsNetstat("-na") + } return listPortsNetstat("-nab") }