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

Azure MFA with Azure AD and RDS

Failed to setup initiator portal. Error status is given in the dump data.

Invalid pointer on gpresult /h gpreport.html