Export all AD Sites, Subnets, and SiteLinks and then import to different system


hi,

any suggestions on how export ad sites, subnets, , sitelinks server 2008 r2 domain , import , define server 2012 r2 domain?  i've seen isolated export , import scripts, not export , import script pair works together.  here save me lots of time manually defining.


thanks help! sdedot

example:

# export sites
get-childitem -path 'ad:\cn=sites,cn=configuration,dc=testnet,dc=local' -filter '(objectclass=site)'| export-clixml sites.clixml

#import , create site
$sites=import-clixml sites.clixml
$sites |%{new-item -path 'ad:\cn=sites,cn=configuration,dc=testnet,dc=local' -name "cn=$($_.name)" -itemtype site }


\_(ツ)_/



Windows Server  >  Windows PowerShell



Comments

Popular posts from this blog

WIMMount (HSM) causing cluster storage to go redirected (2012r2 DC)

Failed to delete the test record dcdiag-test-record in zone test.com

Azure MFA with Azure AD and RDS