- Active Directory Administration Cookbook
- Sander Berkouwer
- 107字
- 2021-06-24 14:42:35
Using Windows PowerShell
Alternatively, Active Directory site links can be managed and deleted using the Active Directory module for Windows PowerShell.
Use the following lines of PowerShell to rename an Active Directory site link:
Import-Module ActiveDirectory
Rename-ADObject -Identity "CN=DEFAULTIPSITELINK,CN=IP,CN=Inter-Site Transports,CN=Sites,CN=Configuration,DC=Lucernpub,DC=com" -NewName "NewADSiteLinkName"
Use the following lines of PowerShell to change the description of an Active Directory site link:
Import-Module ActiveDirectory
Set-ADReplicationSiteLink -Identity "DEFAULTIPSITELINK" -Description "New description here"
Use the following lines of PowerShell to modify the sites that are part of the site link:
Import-Module ActiveDirectory
Set-ADReplicationSiteLink -Identity "DEFAULTIPSITELINK" -SitesIncluded Site1,Site2
Use the following lines of PowerShell to delete a site link:
Import-Module ActiveDirectory
Remove-ADReplicationSiteLink -Identity "DEFAULTIPSITELINK"