thingbsboard, nart port . private
Chạy lệnh này trên PowerShell (Run as Administrator):
Nếu muốn Windows có đổi thì tự kéo lại Private, chạy script này:
while ($true) {
Get-NetConnectionProfile | Where-Object {
$_.NetworkCategory -ne 'Private'
} | Set-NetConnectionProfile -NetworkCategory Private
Start-Sleep -Seconds 10
}
Lưu thành:
C:\force-all-private.ps1
Cho tự chạy lúc boot:
$action = New-ScheduledTaskAction -Execute "powershell.exe" `
-Argument '-ExecutionPolicy Bypass -File "C:\force-all-private.ps1"'
$trigger = New-ScheduledTaskTrigger -AtStartup
Register-ScheduledTask `
-TaskName "ForceAllPrivate" `
-Action $action `
-Trigger $trigger `
-RunLevel Highest `
-Force
Muốn xem trạng thái realtime:
watch { Get-NetConnectionProfile }
(nếu máy không có watch thì dùng:)
while($true){
cls
Get-NetConnectionProfile
Start-Sleep 3
}
Cái lệnh 1 dòng đầu tiên thường là đủ nếu chỉ cần đổi hết sang Private ngay lập tức.

