Active Directory Administration Cookbook
上QQ阅读APP看书,第一时间看更新

Using Windows PowerShell

To create an Active Directory site using the Active Directory module for Windows PowerShell, use the New-ADReplicationSite PowerShell cmdlet. An example of the simplest lines of PowerShell to achieve this goal looks like this:

Import-Module ActiveDirectory

New-ADReplicationSite -Name "Site2"

You can verify your change by listing the Active Directory sites:

Import-Module ActiveDirectory

Get-ADReplicationSite -Filter * | Select Name