Netsh: دليل شامل لإدارة شبكاتك وكلمات المرور في Windows
اكتشف كيفية استخدام netsh لعرض شبكات Windows وإدارتها، وكذلك كلمات المرور المحفوظة.
I
InSkillCoach
· دقيقة
Netsh: دليل شامل لإدارة شبكاتك وكلمات المرور في Windows
يُعد Netsh أداة قوية لإدارة إعدادات الشبكة في Windows. يوضح لك هذا الدليل كيفية استخدامه لعرض شبكاتك وكلمات المرور المحفوظة وإدارتها.
1. عرض الشبكات
قائمة واجهات الشبكة
# Afficher toutes les interfaces réseau
netsh interface show interface
# Afficher les détails d'une interface spécifique
netsh interface show interface name="Ethernet"
# Afficher les configurations IP
netsh interface ipv4 show addresses
إعدادات المحولات
# Afficher les adaptateurs sans fil
netsh wlan show interfaces
# Afficher les réseaux disponibles
netsh wlan show networks
# Afficher les profils enregistrés
netsh wlan show profiles
2. إدارة كلمات مرور الشبكة
عرض كلمات المرور المحفوظة
# Afficher les profils WiFi avec mots de passe
netsh wlan show profiles key=clear
# Afficher les mots de passe pour un profil spécifique
netsh wlan show profile name="NomDuProfil" key=clear
# Exporter les profils WiFi
netsh wlan export profile folder="C:\WiFiProfiles" key=clear
إدارة الملفات التعريفية
# Supprimer un profil WiFi
netsh wlan delete profile name="NomDuProfil"
# Créer un nouveau profil
netsh wlan add profile filename="C:\WiFiProfiles\profil.xml"
# Modifier un profil existant
netsh wlan set profileparameter name="NomDuProfil" keyMaterial="NouveauMotDePasse"
3. إعداد عناوين IP
عرض إعدادات IP
# Afficher la configuration IPv4
netsh interface ipv4 show addresses
# Afficher la configuration IPv6
netsh interface ipv6 show addresses
# Afficher les routes
netsh interface ipv4 show routes
تعديل الإعدادات
# Configurer une adresse IP statique
netsh interface ipv4 set address name="Ethernet" static 192.168.1.100 255.255.255.0 192.168.1.1
# Configurer le DNS
netsh interface ipv4 set dns name="Ethernet" static 8.8.8.8
netsh interface ipv4 add dns name="Ethernet" 8.8.4.4 index=2
4. سكربتات مفيدة
التحقق من إعدادات الشبكة
# Script de vérification réseau
function Test-NetworkConfig {
Write-Host "=== Interfaces Réseau ==="
netsh interface show interface
Write-Host "`n=== Configuration IP ==="
netsh interface ipv4 show addresses
Write-Host "`n=== Routes ==="
netsh interface ipv4 show routes
Write-Host "`n=== Profils WiFi ==="
netsh wlan show profiles
}
إدارة ملفات WiFi التعريفية
# Script de gestion des profils WiFi
function Manage-WiFiProfiles {
param (
[Parameter(Mandatory=$true)]
[string]$Action,
[string]$ProfileName
)
switch ($Action) {
"list" {
netsh wlan show profiles
}
"show" {
netsh wlan show profile name=$ProfileName key=clear
}
"delete" {
netsh wlan delete profile name=$ProfileName
}
"export" {
netsh wlan export profile name=$ProfileName folder="C:\WiFiProfiles" key=clear
}
}
}
5. أمان الشبكة
إعداد جدار الحماية
# Afficher les règles du pare-feu
netsh advfirewall firewall show rule name=all
# Afficher les profils du pare-feu
netsh advfirewall show allprofiles
# Afficher les paramètres de sécurité
netsh advfirewall show global
حماية الاتصالات
# Activer le pare-feu
netsh advfirewall set allprofiles state on
# Configurer les règles de sécurité
netsh advfirewall firewall add rule name="Allow RDP" dir=in action=allow protocol=TCP localport=3389
6. أفضل الممارسات
النسخ الاحتياطي للإعدادات
# Script de sauvegarde des configurations réseau
function Backup-NetworkConfig {
$backupPath = "C:\NetworkBackup"
if (-not (Test-Path $backupPath)) {
New-Item -ItemType Directory -Path $backupPath
}
# Sauvegarde des profils WiFi
netsh wlan export profile folder="$backupPath\WiFi" key=clear
# Sauvegarde des configurations IP
netsh interface ipv4 show addresses > "$backupPath\ipv4_config.txt"
netsh interface ipv6 show addresses > "$backupPath\ipv6_config.txt"
}
تنظيف الإعدادات
# Script de nettoyage des configurations
function Cleanup-NetworkConfig {
# Suppression des profils WiFi inutilisés
$profiles = netsh wlan show profiles | Select-String "All User Profile" | ForEach-Object {$_.Line.Split(":")[1].Trim()}
foreach ($profile in $profiles) {
if (-not (Test-NetConnection -ComputerName $profile -WarningAction SilentlyContinue).PingSucceeded) {
netsh wlan delete profile name=$profile
}
}
}
الخلاصة
تتطلب إدارة الشبكات باستخدام netsh ما يلي:
- فهمًا جيدًا للأوامر
- اهتمامًا خاصًا بالأمان
- نسخًا احتياطيًا منتظمًا
- توثيقًا دقيقًا
النقاط الأساسية التي يجب تذكّرها:
- التحقق من الإعدادات بانتظام
- حفظ نسخ احتياطية من الملفات التعريفية المهمة
- تنظيف الإعدادات غير المستخدمة
- الحفاظ على أمان كلمات المرور
- توثيق التعديلات
نبذة عن InSkillCoach
خبير في التدريب والتقنيات
مدرّب متخصص في التقنيات المتقدمة والذكاء الاصطناعي، تدعمه شركة GNeurone Inc.
الشهادات:
- AWS Certified Solutions Architect – Professional
- شهادات Google Cloud
- Microsoft Certified: DevOps Engineer Expert
- Certified Kubernetes Administrator (CKA)
- CompTIA Security+
652
188
التعليقات
التعليقات مدعومة عبر GitHub Discussions
سجّل الدخول باستخدام GitHub للمشاركة في النقاش