Powershell Command Line Conversion Guide: Active Directory Edition
Powershell Command Line Conversion Guide: Active Directory Edition
ACTIVE DIRECT R! C"D DCPROMO Switch PowerShell Cmdlet Install-ADDSForest Install-ADDSDomain Install-ADDSDomainController Uninstall-ADDSDomainController PowerShell Cmdlet Get-ADOb e!t"#"E$port-CSV Import-CSV"#"'e(-ADOb e!t PowerShell Cmdlet Get-ADComp*ter Get-ADOb e!t"-+DAPFilter",-ob e!tClass.!onta!t/, Get-ADRepli!ationS*bnet Get-ADGro*p Get-ADOr0ani1ationalUnit Get-ADRepli!ationSite Get-ADDomainController Get-ADUser Get-ADOb e!t"-Sear!34ase"-Get-ADDomain/56*otasContainer"-Filter"7 Get-ADOb e!t"-Sear!34ase"-Get-ADForest/5PartitionsContainer"-+DAPFilter",-ob e!tClass.!rossRe8/, PowerShell Cmdlet Get-ADComp*ter Sear!3-ADA!!o*nt Get-ADOb e!t"-+DAPFilter",-ob e!tClass.!onta!t/, Get-ADRepli!ationS*bnet Get-ADGro*p Get-ADOr0ani1ationalUnit Get-ADRepli!ationSite Get-ADDomainController Get-ADUser Sear!3-ADA!!o*nt Get-ADOb e!t"-Sear!34ase"-Get-ADDomain/56*otasContainer"-Filter"7 Get-ADOb e!t"-Sear!34ase"-Get-ADForest/5PartitionsContainer"-+DAPFilter",-ob e!tClass.!rossRe8/, Get-ADOb e!t PowerShell Cmdlet 'e(-ADComp*ter 'e(-ADOb e!t"-)ype"!onta!t 'e(-ADGro*p 'e(-ADOr0ani1ationalUnit 'e(-ADUser PowerShell Cmdlet Mo%e-ADOb e!t Rename-ADOb e!t PowerShell Cmdlet "odule ADDSDeployment Version 2012
C"D CSVDE CSVDE C"D DSGE) DSGE) DSGE) DSGE) DSGE) DSGE) DSGE) DSGE) DSGE) DSGE) C"D DS6UER9 DS6UER9 DS6UER9 DS6UER9 DS6UER9 DS6UER9 DS6UER9 DS6UER9 DS6UER9 DS6UER9 DS6UER9 C"D DSADD DSADD DSADD DSADD DSADD DSADD C"D DSMOVE C"D
Switch i Switch !omp*ter !onta!t s*bnet 0ro*p o* site ser%er *ser 2*ota partition Switch !omp*ter !onta!t s*bnet 0ro*p o* site ser%er *ser 2*ota partition 7 Switch !omp*ter !onta!t 0ro*p o* *ser 2*ota Switch
"odule A!ti%eDire!tory A!ti%eDire!tory "odule A!ti%eDire!tory A!ti%eDire!tory A!ti%eDire!tory A!ti%eDire!tory A!ti%eDire!tory A!ti%eDire!tory A!ti%eDire!tory A!ti%eDire!tory A!ti%eDire!tory A!ti%eDire!tory "odule A!ti%eDire!tory A!ti%eDire!tory A!ti%eDire!tory A!ti%eDire!tory A!ti%eDire!tory A!ti%eDire!tory A!ti%eDire!tory A!ti%eDire!tory A!ti%eDire!tory A!ti%eDire!tory A!ti%eDire!tory "odule A!ti%eDire!tory A!ti%eDire!tory A!ti%eDire!tory A!ti%eDire!tory A!ti%eDire!tory "odule A!ti%eDire!tory "odule
Version 200&"R2 200&"R2 Version 200&"R2 200&"R2 2012 200&"R2 200&"R2 2012 200&"R2 200&"R2 200&"R2 200&"R2 Version 200&"R2 200&"R2 2012 200&"R2 200&"R2 2012 200&"R2 200&"R2 200&"R2 200&"R2 200&"R2 Version 200&"R2 200&"R2 200&"R2 200&"R2 200&"R2 Version 200&"R2 Version
Switch
3ttp:;;a<a5ms;PsCm=G*i=eAD
%051
1"o8">
C"D DSAC+S C"D REPADMI' REPADMI' REPADMI' REPADMI' REPADMI' REPADMI' REPADMI' REPADMI' REPADMI' REPADMI' REPADMI'
Switch
"odule Mi!roso8t5Po(erS3ell5Se!*rity "odule A!ti%eDire!tory A!ti%eDire!tory A!ti%eDire!tory A!ti%eDire!tory A!ti%eDire!tory A!ti%eDire!tory A!ti%eDire!tory A!ti%eDire!tory A!ti%eDire!tory A!ti%eDire!tory A!ti%eDire!tory
Version 200&"R2 Version 2012 2012 2012 2012 2012 2012 2012 2012 200&"R2 200&"R2 200&"R2
Switch ;FailCa!3e ;6*e*e ;ReplSin0leOb ;S3o(Conn ;S3o(Ob Meta ;ReplS*mmary ;S3o(U)DVe! ;SiteOptions ;S3o(Attr ;SetAttr ;PRP
C"D '+)ES) '+)ES) '+)ES) '+)ES) '+)ES) '+)ES) '+)ES) '+)ES) '+)ES) C"D
Switch SC?RESE) SC?VERIF9 SC?C@A'GE?PAD DC+IS) DC'AME DSGE)DC PARE')DOMAI' DOMAI'?)RUS)S S@U)DOA' Switch
"odule Mi!roso8t5Po(erS3ell5Mana0ement Mi!roso8t5Po(erS3ell5Mana0ement Mi!roso8t5Po(erS3ell5Mana0ement A!ti%eDire!tory A!ti%eDire!tory A!ti%eDire!tory A!ti%eDire!tory Mi!roso8t5Po(erS3ell5Mana0ement "odule
Version 2012 2012 2012 200&"R2 200&"R2 200&"R2 2012 200&"R2 Version
3ttp:;;a<a5ms;PsCm=G*i=eAD
%051
2"o8">
Switch
IP C"D PI'G C"D IPCO'FIG IPCO'FIG IPCO'FIG IPCO'FIG IPCO'FIG C"D 'E)S)A) 'E)S)A) C"D Switch Switch ;A++ ;F+US@D'S ;DISP+A9D'S ;REGIS)ERD'S Switch a r Switch PowerShell Cmdlet )est-Conne!tion PowerShell Cmdlet Get-'etIPCon8i0*ration Get-'etIPCon8i0*ration"-Detaile= Clear-DnsClientCa!3e Get-DnsClientCas3e Re0ister-DnsClient PowerShell Cmdlet Get-'et)CPConne!tion Get-'etRo*te PowerShell Cmdlet "odule Mi!roso8t5Po(erS3ell5Mana0ement "odule 'et)CPIP 'et)CPIP DnsClient DnsClient DnsClient "odule 'et)CPIP 'et)CPIP "odule Version 200&"R2 Version 2012 2012 2012 2012 2012 Version 2012 2012 Version
D#S C"D 'S+OODUP C"D Switch Switch PowerShell Cmdlet Resol%e-D'S'ame PowerShell Cmdlet "odule D'SClient "odule Version 2012 Version
3ttp:;;a<a5ms;PsCm=G*i=eAD
%051
B"o8">
D'SCMD D'SCMD
;GoneIn8o ;GoneA==
D'SSer%er D'SSer%er
2012 2012
DISCLAI"ER
)3is"Sample"Co=e"is"pro%i=e="8or"t3e"p*rpose"o8"ill*stration"only"an="is"not"inten=e="to"be"*se="in"a"pro=*!tion"en%ironment5"")@IS"SAMP+E"CODE"A'D"A'9"RE+A)ED"I'FORMA)IO'"ARE"PROVIDED"EAS"ISE"AI)@OU)"AARRA')9"OF"A'9"DI'DF"EI)@ER"EHPRESSED"OR" IMP+IEDF"I'C+UDI'G"4U)"'O)"+IMI)ED")O")@E"IMP+IED"AARRA')IES"OF"MERC@A')A4I+I)9"A'D;OR"FI)'ESS"FOR"A"PAR)ICU+AR"PURPOSE5""Ae"0rant"9o*"a"none$!l*si%eF"royalty-8ree"ri03t"to"*se"an="mo=i8y"t3e"Sample"Co=e"an="to"repro=*!e"an="=istrib*te"t3e" ob e!t"!o=e"8orm"o8"t3e"Sample"Co=eF"pro%i=e="t3at"9o*"a0ree:"-i/"to"not"*se"O*r"nameF"lo0oF"or"tra=emar<s"to"mar<et"9o*r"so8t(are"pro=*!t"in"(3i!3"t3e"Sample"Co=e"is"embe==e=I"-ii/"to"in!l*=e"a"%ali="!opyri03t"noti!e"on"9o*r"so8t(are"pro=*!t"in"(3i!3"t3e"Sample" Co=e"is"embe==e=I"an="-iii/"to"in=emni8yF"3ol="3armlessF"an="=e8en="Us"an="O*r"s*ppliers"8rom"an="a0ainst"any"!laims"or"la(s*itsF"in!l*=in0"attorneysJ"8eesF"t3at"arise"or"res*lt"8rom"t3e"*se"or"=istrib*tion"o8"t3e"Sample"Co=e5 )3is"postin0"is"pro%i=e="EAS"ISE"(it3"no"(arrantiesF"an="!on8ers"no"ri03ts5"Use"o8"in!l*=e="s!ript"samples"are"s*b e!t"to"t3e"terms"spe!i8ie="at"3ttp:;;(((5mi!roso8t5!om;in8o;!pyri03t53tm5
3ttp:;;a<a5ms;PsCm=G*i=eAD
%051
>"o8">