Active Directory ドメイン サービス (AD DS) へPowerShellでサイト&サイトリンク追加
なかなかたどり着けなかったので。
サンプル
なかなかたどり着けなかったので。
サンプル
#サイト追加
New-ADObject -Name 'サイト名' -Type site -Description '任意' -Path 'CN=Sites,CN=Configuration,DC=Hoge,DC=com'
#サブネット
New-ADObject -Name '192.168.100.0/24' -Type subnet -OtherAttributes @{location="任意";siteObject="サイト名",CN=Sites,CN=Configuration,DC=Hoge,DC=com"} -Path "CN=Subnets,CN=Sites,CN=Configuration,DC=Hoge,DC=com"
#サイトリンク追加
New-ADObject -Name 'サイトリンク名' -Type SiteLink -Path "CN=IP,CN=Inter-Site Transports,CN=Sites,CN=Configuration,DC=Hoge,DC=com" -OtherAttributes @{siteList="CN=サイト名,CN=Sites,CN=Configuration,DC=Hoge,DC=com","CN=サイト名2,CN=Sites,CN=Configuration,DC=Hoge,DC=com"; replInterval=180; cost=100}
New-ADObject -Name 'サイト名' -Type site -Description '任意' -Path 'CN=Sites,CN=Configuration,DC=Hoge,DC=com'
#サブネット
New-ADObject -Name '192.168.100.0/24' -Type subnet -OtherAttributes @{location="任意";siteObject="サイト名",CN=Sites,CN=Configuration,DC=Hoge,DC=com"} -Path "CN=Subnets,CN=Sites,CN=Configuration,DC=Hoge,DC=com"
#サイトリンク追加
New-ADObject -Name 'サイトリンク名' -Type SiteLink -Path "CN=IP,CN=Inter-Site Transports,CN=Sites,CN=Configuration,DC=Hoge,DC=com" -OtherAttributes @{siteList="CN=サイト名,CN=Sites,CN=Configuration,DC=Hoge,DC=com","CN=サイト名2,CN=Sites,CN=Configuration,DC=Hoge,DC=com"; replInterval=180; cost=100}