همهی دستورات را در PowerShell با «Run as Administrator» اجرا کنید. در نسخهی Server Core، ابزار منویی sconfig هم همین کارها را انجام میدهد.
۱. اطلاعات سیستم
Get-ComputerInfo | Select-Object WindowsProductName, OsVersion, CsName۲. IP ثابت و DNS
Get-NetAdapter
New-NetIPAddress -InterfaceAlias "Ethernet" -IPAddress 192.168.10.15 -PrefixLength 24 -DefaultGateway 192.168.10.1
Set-DnsClientServerAddress -InterfaceAlias "Ethernet" -ServerAddresses 192.168.10.10,192.168.10.11۳. منطقهی زمانی و نام سرور
Set-TimeZone -Id "Iran Standard Time"
Rename-Computer -NewName "FS01" -Restart۴. Remote Desktop امن
Set-ItemProperty -Path 'HKLM:\System\CurrentControlSet\Control\Terminal Server' -Name fDenyTSConnections -Value 0
Set-ItemProperty -Path 'HKLM:\System\CurrentControlSet\Control\Terminal Server\WinStations\RDP-Tcp' -Name UserAuthentication -Value 1
Enable-NetFirewallRule -DisplayGroup "Remote Desktop"UserAuthentication = 1 یعنی NLA فعال است و پیش از باز شدن نشست، احراز هویت انجام میشود. RDP را هرگز مستقیم به اینترنت باز نکنید؛ از VPN استفاده کنید.
۵. مدیریت از راه دور
Enable-PSRemoting -Force
Get-Service WinRMاز سرور دیگر:
Enter-PSSession -ComputerName FS01۶. بهروزرسانی
در Windows Server 2025 از Settings → Windows Update، و در نسخههای قبلی از sconfig (گزینهی ۶) استفاده کنید. برای بررسی آخرین بهروزرسانیهای نصبشده:
Get-HotFix | Sort-Object InstalledOn -Descending | Select-Object -First 5۷. عضویت در دامین
Add-Computer -DomainName corp.sahor.ir -Credential CORP\Administrator -Restart