T

PowerShell වලින් VPN Manage කරන ආකාරය

34 views · updated 2026-07-01 · published 2026-07-01 · by Hasarinda Manjula · Microsoft Windows Reading time: 1 min English සිංහල

Overview

PowerShell වලින් VPN connections හදන්නත් manage කරන්නත් පුළුවන්, එක profile එකම machines ගොඩකට scripting කරලා deploy කරන්න මේක නියමයි. මේ guide එකෙන් built-in VPN cmdlets එක්ක VPN profiles add කරන, connect කරන, සහ remove කරන විදිය කියලා දෙනවා.

Key Takeaways

  • Add-VpnConnection cmdlet එකෙන් VPN profile එකක් හදනවා.
  • Get-VpnConnection එකෙන් තියෙන profiles list කරනවා.
  • rasdial එකෙන් profile එකක් connect සහ disconnect කරනවා.
  • Remove-VpnConnection එකෙන් profile එකක් delete කරනවා.

Add and Connect

1. PowerShell එක administrator විදිහට open කරන්න.

2. profile එකක් හදන්න: Add-VpnConnection -Name "Work VPN" -ServerAddress vpn.example.com -TunnelType Automatic

3. තහවුරු කරගන්න profiles list කරන්න: Get-VpnConnection

4. මෙයින් connect කරන්න: rasdial "Work VPN"

Manage and Remove

1. Set-VpnConnection එකෙන් settings adjust කරන්න, උදාහරණයක් විදිහට tunnel type එක හෝ split tunneling වෙනස් කරන්න.

2. මෙයින් disconnect කරන්න: rasdial "Work VPN" /disconnect

3. profile එකක් මෙයින් remove කරන්න: Remove-VpnConnection -Name "Work VPN" -Force

4. වෙනස තහවුරු කරගන්න Get-VpnConnection එක ආයෙත් run කරන්න.

Note: authentication වෙනුවෙන්, ඔයාගේ VPN type එකට හරියන options දෙන්න; shared scripts වල credentials කවදාවත් hard-code කරන්න එපා.

Troubleshooting

Problem: Add-VpnConnection එකෙන් access denied කියනවා.

Solution: PowerShell එක administrator විදිහට run කරන්න, නැත්නම් හරි privileges එක්ක -AllUserConnection එක add කරන්න.

Problem: VPN එක connect වෙන්නේ නෑ.

Solution: server address එක, tunnel type එක, සහ authentication settings ඔයාගේ VPN එකේ requirements එක්ක ගැළපෙනවද කියලා තහවුරු කරගන්න.

Problem: profile එක අනිත් users ට පේන්නේ නෑ.

Solution: accounts ඔක්කොටම පාවිච්චි කරන්න පුළුවන් වෙන්න -AllUserConnection එක්ක ඒක හදන්න.

Problem: ඔයාට setting එකක් වෙනස් කරන්න ඕන.

Solution: profile එක ආයෙත් හදනවා වෙනුවට Set-VpnConnection පාවිච්චි කරන්න.

Conclusion

PowerShell ගේ VPN cmdlets වලින් connections හදන එකයි manage කරන එකයි සම්පූර්ණයෙන්ම scriptable කරනවා. profiles consistent විදිහට deploy කරන්න Add-VpnConnection එකත්, demand එකට connect කරන්න rasdial එකත් පාවිච්චි කරන්න.

About TechHub

මේ guide එක TechHub Knowledge Base එකේ කොටසක්. තව step-by-step IT guides සහ support වලට techhub.com.lk එකට යන්න.

Thanks for your feedback! 🙌

Read more

TechHub Assistant
Online · AI assistant
Thinking
⬇ Downloads 📦 Orders 🛒 Buy License 🎫 Create Ticket 🙋 Contact
AI-generated · may be inaccurate. Talk to a human