ICode9

精准搜索请尝试: 精确搜索
首页 > 系统相关> 文章详细

install on windows server 2019 core

2020-03-21 22:55:24  阅读:642  来源: 互联网

标签:core Web ex19 windows Get Server 2019 gazh


1. install win server 2019 core

image

2.sconfig.exe

image

 

Get-NetFirewallRule -DisplayGroup "File and Printer Sharing" |select Name,Enabled,Direction,Action

Enable-NetFirewallRule -DisplayGroup "File and Printer Sharing"

Enable-NetFirewallRule -DisplayGroup "文件和打印机共享"

Get-NetIPAddress

New-NetIPAddress -InterfaceIndex 6 -IPAddress 192.168.222.20  -PrefixLength 24 -DefaultGateway 192.168.222.2

Set-DNSClientServerAddress -InterfaceIndex 6 -ServerAddress "192.168.222.20,192.168.222.2"

3.install AD

Install-WindowsFeature -Name AD-Domain-Services

$Password = Read-Host -Prompt   'Enter SafeMode Admin Password'  -AsSecureString

Install-ADDSForest -CreateDnsDelegation:$false -DatabasePath C:\Windows\NTDS -DomainMode WinThreshold -DomainName afd.ink -DomainNetbiosName afd -ForestMode WinThreshold -InstallDns:$true -LogPath C:\Windows\NTDS -NoRebootOnCompletion:$true -SafeModeAdministratorPassword $Password -SysvolPath C:\Windows\SYSVOL -Force:$true

image

restart-computer

 

4. Add admin user:

Get-ADUser -Identity "Administrator" -Properties *

set-ADUser administrator -PasswordNeverExpires  $true

New-ADUser -Name 'gazh' -SamAccountName 'gazh' -DisplayName 'gazh' -Enabled $True  -PasswordNeverExpires $True -UserPrincipalName 'gazh@afd.ink' -AccountPassword (Read-Host "Password" -AsSecureString) -PassThru

image

OR:

$SecurePW = Read-Host -Prompt "Enter a password" -asSecureString
New-ADUser -Name "gazh" `
           -AccountPassword $SecurePW  `
           -SamAccountName 'gazh' `
           -DisplayName 'gazh' `
           -Enabled $True `
           -PassThru `
           -PasswordNeverExpires $True `
           -UserPrincipalName 'gazh@afd.ink'

 

 

$SuperUserGroups = @()
$SuperUserGroups = (Get-ADUser -Identity "Administrator" -Properties * ).MemberOf
ForEach ($Group in $SuperUserGroups ) { Add-ADGroupMember -Identity $Group -Members "gazh"}
(Get-ADUser -Identity gazh -Properties *).MemberOf

image

 

3.install AD-Certificate

Install-WindowsFeature AD-Certificate,ADCS-Cert-Authority,ADCS-Web-Enrollment

Install-AdcsCertificationAuthority  -ValidityPeriod  Years  -ValidityPeriodUnits 20 -CACommonName Afd-CA

配置 Certificate Authority Web Enrollment:

Install-AdcsWebEnrollment

image

打开浏览:http://server_ip/certsrv

就可以通过浏览器申请证书了。

image

 

4.install exchange server 2019

Enable-NetFirewallRule -DisplayGroup "文件和打印机共享"

Get-NetIPAddress

New-NetIPAddress -InterfaceIndex 6 -IPAddress 192.168.222.25  -PrefixLength 24 -DefaultGateway 192.168.222.2

Set-DNSClientServerAddress -InterfaceIndex 6 -ServerAddress 192.168.222.20

加入域并安装必要软件 :https://docs.microsoft.com/en-us/Exchange/plan-and-deploy/prerequisites?view=exchserver-2019

安装 .net 4.8

Exchange 2019 Mailbox servers on Windows Server 2019
  1. Install the following software:

    a. .NET Framework 4.8

    b. Visual C++ Redistributable Package for Visual Studio 2012

    c. Visual C++ Redistributable Package for Visual Studio 2013

    Note

    An overview of the latest supported versions is available at: Visual C++ Redistributable versions

Start-BitsTransfer  -Source https://download.visualstudio.microsoft.com/download/pr/014120d7-d689-4305-befd-3cb711108212/0fd66638cde16859462a6243a4629a50/ndp48-x86-x64-allos-enu.exe -Destination .\Downloads\

Start-BitsTransfer  -Source  https://download.visualstudio.microsoft.com/download/pr/10912040/8a9bc6a378988031b4de96bf6eecbe37/vcredist_x64.exe -Destination .\Downloads\

.\Downloads\ndp48-x86-x64-allos-enu.exe /q

 

D:\UCMARedist\setup.exe

image

Get-CimInstance -ClassName Win32_Product |select Name

image

 

2.install windows feature

Install-WindowsFeature Server-Media-Foundation, NET-Framework-45-Features, RPC-over-HTTP-proxy, RSAT-Clustering, RSAT-Clustering-CmdInterface, RSAT-Clustering-PowerShell, WAS-Process-Model, Web-Asp-Net45, Web-Basic-Auth, Web-Client-Auth, Web-Digest-Auth, Web-Dir-Browsing, Web-Dyn-Compression, Web-Http-Errors, Web-Http-Logging, Web-Http-Redirect, Web-Http-Tracing, Web-ISAPI-Ext, Web-ISAPI-Filter, Web-Metabase, Web-Mgmt-Service, Web-Net-Ext45, Web-Request-Monitor, Web-Server, Web-Stat-Compression, Web-Static-Content, Web-Windows-Auth, Web-WMI, RSAT-ADDS

3.AD扩展:

 

.\Setup.exe /PrepareSchema /IAcceptExchangeServerLicenseTerms

.\Setup.exe /PrepareAD /OrganizationName:"Afd" /IAcceptExchangeServerLicenseTerms

 

4.安装 Exchange 2019

d:\Setup.exe /m:install /roles:m /IAcceptExchangeServerLicenseTerms /InstallWindowsComponents /CustomerFeedbackEnabled:false

image

5.Post-Installation Tasks:

Add-PSSnapin Microsoft.Exchange.Management.PowerShell.SnapIn;

Exchange Server 2019 Enterprise
YCQY7-BNTF6-R337H-69FGX-P39TY

Exchange Server 2019 Standard
G3FMN-FGW6B-MQ9VW-YVFV8-292KP

 

Set-ExchangeServer ex19 -ProductKey G3FMN-FGW6B-MQ9VW-YVFV8-292KP

Restart-Service MSExchangeIS

1)配置Exchange 证书:

$Data = New-ExchangeCertificate -FriendlyName "Ex19-CA" -GenerateRequest -SubjectName "c=cn,o=afd,cn=mail.afd.ink" -DomainName mail.afd.ink,autodiscover.afd.ink,ex19.afd.ink -PrivateKeyExportable $true

Set-Content -path "\\ex19\C$\Ex19-CA.req" -Value $Data

用记事本打开 \\ex19\C$\Ex19-CA.req 复制其内容到,http://CA-Server-ip/certsrv 去申请证书:

将申请到的证书下载到:\\ex19\C$\ex-ca.cer

Import-ExchangeCertificate -Server ex19 -FileData ([Byte[]]$(Get-Content -Path "\\ex19\C$\ex-ca.cer" -Encoding byte -ReadCount 0)) | Enable-ExchangeCertificate -Server ex19 -Services "IIS,POP,IMAP,SMTP"

 

2)Send Connector:

New-SendConnector -Name "Send To Internet" -Internet -AddressSpaces "*" -DNSRoutingEnabled:$TRUE -SourceTransportServers "ex19"

 

3)Receive Connector:

Get-ReceiveConnector -Server ex19 |select Identity,PermissionGroups

image

标签:core,Web,ex19,windows,Get,Server,2019,gazh
来源: https://blog.51cto.com/ganzy/2480747

本站声明: 1. iCode9 技术分享网(下文简称本站)提供的所有内容,仅供技术学习、探讨和分享;
2. 关于本站的所有留言、评论、转载及引用,纯属内容发起人的个人观点,与本站观点和立场无关;
3. 关于本站的所有言论和文字,纯属内容发起人的个人观点,与本站观点和立场无关;
4. 本站文章均是网友提供,不完全保证技术分享内容的完整性、准确性、时效性、风险性和版权归属;如您发现该文章侵犯了您的权益,可联系我们第一时间进行删除;
5. 本站为非盈利性的个人网站,所有内容不会用来进行牟利,也不会利用任何形式的广告来间接获益,纯粹是为了广大技术爱好者提供技术内容和技术思想的分享性交流网站。

专注分享技术,共同学习,共同进步。侵权联系[81616952@qq.com]

Copyright (C)ICode9.com, All Rights Reserved.

ICode9版权所有