0% found this document useful (0 votes)
259 views4 pages

Powershell Command Line Conversion Guide: Active Directory Edition

This document provides a guide to converting common Active Directory command line commands to their equivalent PowerShell cmdlets. It includes cmdlets for managing domains, domain controllers, users, groups, and other AD objects. It also includes cmdlets for managing DNS servers and DNS records.

Uploaded by

Dhaval Pandya
Copyright
© Attribution Non-Commercial (BY-NC)
Available Formats
Download as PDF, TXT or read online on Scribd
Download as pdf or txt
0% found this document useful (0 votes)
259 views4 pages

Powershell Command Line Conversion Guide: Active Directory Edition

This document provides a guide to converting common Active Directory command line commands to their equivalent PowerShell cmdlets. It includes cmdlets for managing domains, domain controllers, users, groups, and other AD objects. It also includes cmdlets for managing DNS servers and DNS records.

Uploaded by

Dhaval Pandya
Copyright
© Attribution Non-Commercial (BY-NC)
Available Formats
Download as PDF, TXT or read online on Scribd
Download as pdf or txt
Download as pdf or txt
You are on page 1/ 4

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">

PowerShell Command Line Conversion Guide: Active Directory Edition


C"D DSMOD DSMOD DSMOD DSMOD DSMOD DSMOD DSMOD DSMOD C"D DSRM Switch !omp*ter !onta!t 0ro*p o* ser%er *ser 2*ota partition Switch PowerShell Cmdlet Set-ADComp*ter Set-ADOb e!t Set-ADGro*p Set-ADOr0ani1ationalUnit Set-ADOb e!t Set-ADUser Set-ADOb e!t Set-ADOb e!t PowerShell Cmdlet Remo%e-ADComp*ter Remo%e-ADGro*p Remo%e-ADGro*pMember Remo%e-ADUser Remo%e-ADOr0ani1ationalUnit Remo%e-ADOb e!t PowerShell Cmdlet Get-AC+ Set-AC+ PowerShell Cmdlet Get-ADRepli!ationFail*re Get-ADRepli!ation6*e*eOperation Syn!-ADOb e!t Get-ADRepli!ationConne!tion Get-ADRepli!ationAttrib*teMeta=ata Get-ADRepli!ationPartnerMeta=ata Get-ADRepli!ationUp)oDatenessVe!tor)able Set-ADRepli!ationSite Get-ADOb e!t Set-ADOb e!t Get-ADDomainControllerPass(or=Repli!ationPoli!y A==-ADDomainControllerPass(or=Repli!ationPoli!y Remo%e-ADDomainControllerPass(or=Repli!ationPoli!y Get-ADA!!o*ntRes*ltantPass(or=Repli!ationPoli!y Get-ADDomainControllerPass(or=Repli!ationPoli!yUsa0e PowerShell Cmdlet )est-Comp*terSe!*reC3annel"-Repair )est-Comp*terSe!*reC3annel Reset-Comp*terMa!3inePass(or= Get-ADDomainController Get-ADDomain"#"Sele!t-Ob e!t"PDCEm*lator Get-ADDomainController -Get-AMIOb e!t"AinB2?Comp*terSystem/5Domain Get-AD)r*st Stop-Comp*ter PowerShell Cmdlet "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 "odule A!ti%eDire!tory Version 200&"R2 200&"R2 200&"R2 200&"R2 200&"R2 200&"R2 200&"R2 200&"R2 Version 200&"R2

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">

PowerShell Command Line Conversion Guide: Active Directory Edition


C"D 'E)DOM 'E)DOM 'E)DOM 'E)DOM 'E)DOM 'E)DOM 'E)DOM 'E)DOM 'E)DOM 'E)DOM 'E)DOM 'E)DOM 'E)DOM 'E)DOM 'E)DOM 'E)DOM C"D GPUPDA)E GPRESU+) C"D Switch ADD COMPU)ER'AME COI' MOVE RESE)PAD REMOVE RE'AMECOMPU)ER RESE) VERIF9 6UER9"AORDS)A)IO' 6UER9"SERVER 6UER9"DC 6UER9"OU 6UER9"PDC 6UER9"FSMO 6UER9")RUS) Switch PowerShell Cmdlet A==-Comp*ter Rename-Comp*ter A==-Comp*ter A==-Comp*ter Reset-Comp*terMa!3inePass(or= Remo%e-Comp*ter Rename-Comp*ter )est-Comp*terSe!*reC3annel"-Repair )est-Comp*terSe!*reC3annel Get-ADComp*ter"-Filter"Eoperatin0System"-notli<e",7ser%er7,E Get-ADComp*ter"-Filter"Eoperatin0System"-li<e",7ser%er7,E Get-ADDomainController Get-ADOr0ani1ationalUnit Get-ADDomain"#"Sele!t-Ob e!t"PDCEm*lator Get-ADForest"#"Sele!t-Ob e!t"Domain'amin0MasterF"S!3emaMaster Get-ADDomain"#"Sele!t-Ob e!t"In8rastr*!t*reMasterF"PDCEm*latorF"RIDMaster Get-AD)r*st PowerShell Cmdlet In%o<e-GPUp=ate Get-GPRes*ltantSetO8Poli!y PowerShell Cmdlet "odule Mi!roso8t5Po(erS3ell5Mana0ement Mi!roso8t5Po(erS3ell5Mana0ement Mi!roso8t5Po(erS3ell5Mana0ement Mi!roso8t5Po(erS3ell5Mana0ement Mi!roso8t5Po(erS3ell5Mana0ement Mi!roso8t5Po(erS3ell5Mana0ement 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 A!ti%eDire!tory A!ti%eDire!tory A!ti%eDire!tory "odule Gro*pPoli!y Gro*pPoli!y "odule Version 2012 2012 2012 2012 2012 2012 2012 2012 2012 200&"R2 200&"R2 200&"R2 200&"R2 200&"R2 200&"R2 2012 Version 2012 200&"R2 Version

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">

PowerShell Command Line Conversion Guide: Active Directory Edition


C"D D'SCMD D'SCMD D'SCMD D'SCMD D'SCMD D'SCMD D'SCMD Switch ;In8o ;Con8i0 ;En*mGones ;Statisti!s ;ClearCa!3e ;StartS!a%en0in0 ;ResetFor(ar=ers PowerShell Cmdlet Get-DnsSer%er Set-DnsSer%er Get-DnsSer%erGone Get-DnsSer%erStatisti!s Clear-DnsSer%erStatisti!s Clear-DnsSer%erCa!3e Start-DnsSer%erS!a%en0in0 Get-DnsSer%erFor(ar=er Set-DnsSer%erFor(ar=er A==-DnsSer%erFor(ar=er Remo%e-DnsSer%erFor(ar=er Set-DnsSer%erCon=itionalFor(ar=erGone A==-DnsSer%erCon=itionalFor(ar=erGone Get-DnsSer%erGone A==-DnsSer%erPrimaryGone A==-DnsSer%erSe!on=aryGone A==-DnsSer%erSt*bGone Remo%e-DnsSer%erGone Get-DnsSer%erS!a%en0in0 Set-DnsSer%erS!a%en0in0 Set-DnsSer%erSe!on=aryGone E$port-DnsSer%erGone A==-DnsSer%erReso*r!eRe!or= A==-DnsSer%erReso*r!eRe!or=A A==-DnsSer%erReso*r!eRe!or=AAAA A==-DnsSer%erReso*r!eRe!or=C'ame A==-DnsSer%erReso*r!eRe!or=DS A==-DnsSer%erReso*r!eRe!or=MH A==-DnsSer%erReso*r!eRe!or=Ptr Remo%e-DnsSer%erReso*r!eRe!or= Set-DnsSer%erReso*r!eRe!or=A0in0 Get-DnsSer%erReso*r!eRe!or=" A==-DnsSer%er)r*stAn!3or Remo%e-DnsSer%er)r*stAn!3or Get-DnsSer%er)r*stAn!3or PowerShell Cmdlet "odule D'SSer%er D'SSer%er D'SSer%er D'SSer%er D'SSer%er D'SSer%er D'SSer%er Version 2012 2012 2012 2012 2012 2012 2012

D'SCMD D'SCMD

;GoneIn8o ;GoneA==

D'SSer%er D'SSer%er

2012 2012

D'SCMD D'SCMD D'SCMD D'SCMD D'SCMD

;GoneDelete ;GoneResetS!a%en0eSer%ers ;GoneResetMasters ;GoneE$port ;Re!or=A==

D'SSer%er D'SSer%er D'SSer%er D'SSer%er D'SSer%er

2012 2012 2012 2012 2012

D'SCMD D'SCMD D'SCMD D'SCMD D'SCMD D'SCMD C"D

;Re!or=Delete ;A0eAllRe!or=s ;GonePrint" ;)r*stAn!3orA== ;)r*stAn!3orDelete ;En*m)r*stAn!3ors Switch

D'SSer%er D'SSer%er D'SSer%er D'SSer%er D'SSer%er D'SSer%er "odule

2012 2012 2012 2012 2012 2012 Version

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">

You might also like