Windows 2012 Core Survival Guide – Joining the Domain


Learn about my 2012 Core Survival Guide here.

Joining the Domain

Everybody at some point will need to join their computers to the domain.  This blog will cover the basics of viewing your settings, joining the domain and removing your computer from the domain.

How to view Domain Settings

We can view the domain name by using a WMI object Win32_ComputerSystem.  I still looking for a good way to do this native with PowerShell 3.0

PowerShell Command:

(Get-WmiObject Win32_ComputerSystem).domain

The output below shows the domain name of the computer.  In this case it is “WORKGROUP”

 

How to join the computer to the Domain

By joining your computer to the domain you will get all of the benefits that the domain has to offer.  The PowerShell cmdlet we use is “Add-computer”.

PowerShell Command:

Add-computer -DomainName Contoso.com -Credential Contoso\Administrator -Restart

The output below of the first command shows the current domain name of the computer.  In this case it is “WORKGROUP”.  The second command joins the computer to the domain Contoso.com.  In addition, the second command will prompt you for credentials of an account with domain join privileges in the domain you are trying to join.

 

How to Join a Domain and place the computer in an Organizational Unit (OU)

Most corporations have well defined OU structures and do not want computer objects place in the default folder.  By placing the computer object in the correct OU saves you time.  Below is the cmdlet that will help us with that.  You must know the complete distinguished name (spelling counts here) of the OU you wish to place the computer into.  If the distinguished name has any spaces in it you must quote the entire name.  I found it makes my life easier to always quote the distinguished name.

PowerShell Command:

Add-computer -DomainName Contoso.com -OUPath “OU=Servers, OU=Assets,DC=Contoso,DC=COM” -Credential Contoso\Administrator -Restart

The output below of the first command shows the current domain name of the computer.  In this case it is “WORKGROUP”.  The second command joins the computer to the domain Contoso.com in the OU “Servers”.  In addition, the second command will prompt you for credentials of an account with domain join privileges in the domain you are trying to join.  The computer will reboot when the command is completed.

 

 

How to leave a Domain

When you leave a domain you default back to the “Workgroup”

PowerShell Command:

Remove-Computer -UnjoinDomaincredential Contoso\Administrator -Passthru -Verbose -Restart 

The output below of the first command shows the current domain name of the computer.  In this case it is “Contoso.Com”.  The second cmdlet will remove it from the domain.  In addition, the second command will prompt you for credentials of an account with domain join privileges in the domain you are trying to leave.  Finally when the command completes the computer will reboot.

 

 

 

I hope you found this useful.  Please leave me a comment.  Let me know if there are any core tasks you would like me to cover.

Bruce

 

Comments (14)

  1. genie says:

    Thanks 🙂

  2. balbik says:

    Yang Terbaru Dari bintang http://bit.ly/1IF5KHs Bintang.com
    Yang Terbaru Dari berita hari ini http://bit.ly/1IF5KHs Bintang.com
    Yang Terbaru Dari berita terkini http://bit.ly/1amc1IW Bintang.com
    Yang Terbaru Dari berita selebritis hari ini http://bit.ly/1PBX4n9 Bintang.com
    Yang Terbaru Dari gosip artis terbaru http://bit.ly/1IF5KHs Bintang.com

  3. crf123 says:

    http://www.oakley-sunglasses.top/
    http://www.omegawatches.us.com/
    http://www.pandora-charms.org.uk/
    http://www.pandorajewelry.top/
    http://www.polo-outlets.com.co/
    http://www.pradahandbags.net.co/
    http://www.pradahandbags.com.co/
    http://www.pradashoes.com.co/
    http://www.ralph-lauren.org.uk/
    http://www.ralphlaurenoutlet.us.com/
    http://www.ralphlauren-outlet.org.uk/
    http://www.ralphlaurenoutletonline.com.co/
    http://www.ralphlaurenoutletonline.in.net/
    http://www.ralphlaurenpolo.in.net/
    http://www.ray-ban-outlet.us.com/
    http://www.raybans.us.org/
    http://www.rayban-sunglasses.org.uk/
    http://www.rayban-sunglasses.us.org/
    http://www.ray-ban-sunglasses-outlet.in.net/
    http://www.raybanwayfarer.in.net/
    http://www.replicahandbags.com.co/
    http://www.replica-watches.us.com/
    http://www.retro-jordans.com/
    http://www.rolex-watches.me.uk/
    http://www.rosherun.org.uk/
    http://www.rosheruns.us/
    http://www.salvatoreferragamo.in.net/
    http://www.soccer-shoes.org/
    http://www.softball-bats.us/
    http://www.suprashoes.in.net/
    http://www.swarovskicrystal.com.co/
    http://www.swarovskijewelry.com.co/
    http://www.swarovski-uk.org.uk/
    http://www.the-northface.com.co/
    http://www.thenorthface.in.net/
    http://www.thenorth-face.org.uk/
    http://www.thenorthface.us.org/
    http://www.thenorthfacejackets.in.net/
    http://www.thomas-sabo-uk.co.uk/
    http://www.tiffanyandco.net.co/
    http://www.tiffanyjewelry.us.org/
    http://www.timberlandboots-outlet.in.net/
    http://www.timberlandshoes.com.co/
    http://www.tommyhilfiger.net.co/
    http://www.tommy-hilfigeroutlet.com/
    http://www.toms-shoes-outlet.net/
    http://www.toms–outlet.in.net/
    http://www.toms-shoes.com.co/
    http://www.tory-burch-outlet.in.net/
    http://www.tory-burchoutlet.us.com/
    http://www.true-religion.com.co/
    http://www.truereligionjeans.net.co/
    http://www.truereligion-outlet.com.co/
    http://www.ugg-australia.in.net/
    http://www.uggboots.net.co/
    http://www.uggbootsclearance.com.co/
    http://www.uggsonsale.com.co/
    http://www.uggsoutlet.com.co/
    http://www.uptocoachoutlet.com/
    http://www.vansshoes.us/
    http://www.weddingdressesuk.org.uk/
    http://www.yogapants.com.co/
    http://www.ugg-boots.us.org/
    http://www.poloralphlaurenoutlet.net.co/
    http://www.burberryoutletonline.ar.com/
    http://www.toms-outlet.net.co/
    http://www.michaelkors.in.net/
    http://www.christianlouboutinoutlet.net.co/
    http://www.toryburchsale.com.co/
    http://www.pradaoutlet.com.co/
    http://www.longchamp-handbags.in.net/
    http://www.longchampoutlet.com.co/

  4. Adams says:

    Get the Latest Box Office collection report on
    http://colors.hdtwist.com

  5. aaron says:

    New portal to get updates for the latest news and box office collection
    https://hotbooster.blogspot.com/

  6. kabar berita terkini says:

    berita terkini dan terpopuler di http://britau.com
    indeks berita terkini di http://britau.com/index
    nonton siaran langsung bola online di http://nobartv.com
    indeks berita bola terkini hari ini di
    http://nobartv.com/index-berita
    kabar berita bola terkini dan terbaru di
    http://nobartv.com/beritabola
    komunitas sepak bola online indonesia di http://soccerio.net

  7. watch movies online bioskop21.id says:

    http://www.bioskop21.idhttp://www.bioskop21.mobihttp://www.bioskop21.cohttp://www.movie25.link => Nonton Film Movie Cinema Bioskop 21 Online Gratis Subtitle Indonesia, watch free movie online, nonton film online gratis tanpa download, download film bioskop terbaru gratis,
    nonton drama korea online,nonton drama korea online indonesian subtitle,movie streaming online,download film cinema 21, movie25, putlocker, solarmovie, ganool.ag, bioskop21.id, watch32, theater 21, cineplex 21, watch movies online, watch free movies online
    movie25, classic movies, cinema movies, new movies, online movies, latest movies, download movies, movie8k, Synopsis Film Bioskop 21, Jadwal Tayang Film Bioskop 21, Nonton Film Bioskop 21 Online Gratis Subtitle Indonesia, watch free movies online, nonton film
    online gratis tanpa download, download film bioskop terbaru gratis, nonton drama korea online, nonton drama korea online indonesian subtitle, movie streaming online, download film cinema 21, Jadwal Film Tayang di Bioskop 21, Film Rilis Bioskop XXI, Daftar
    Film Terbaru Bioskop, Film Hollywood, Film Asia, Film Bollywood, Film Korea, Film Indonesia di Bioskop Seluruh Indonesia
    =================================================
    http://www.vidio.com/@bioskop21id
    http://bioskop21co.blogspot.com/2015/12/4-situs-nonton-film-bioskop-21-online.html
    http://bioskop21co.wikidot.com
    http://nontonfilmonlinebioskop21.yolasite.com

    http://bioskop21co.livejournal.com/757.html

    http://www.reddit.com/r/movies/comments/3yzewa/bioskop21co_situs_terbaik_nonton_nonton_film/?ref=share&ref_source=link
    http://delicious.com/bioskop21co
    http://youtu.be/QRhRV09k_WY
    http://www.plurk.com/ganool168
    http://forum.nontonhbo.net
    http://blondin.info
    http://bioskop21.co
    http://bioskop21.id
    http://bioskop21.mobi
    http://nontonfilmonline.top
    http://movie25.link
    http://tv.bioskop21.id
    http://goo.gl/FmM4br
    http://film-war.net
    http://film21.in
    http://ganool.nl
    http://ganool168.org
    http://www.bioskop21.info
    http://nontonhbo.com
    http://bioskop-21.com
    http://nontonfilmhbo.com
    http://nonton-filmonline.com
    http://nontonfilm-online.com
    http://ganool.be
    http://kaskus.eu
    http://filmbioskop.my.id
    http://nontonhbo.net
    http://fadly168.com
    http://fadly168.net
    http://fadly168.my.id
    http://fadly168.ga
    http://filmbioskop.at.ua
    http://bokep168.me
    http://ceritadewasa.co.uk
    http://obatkuatsex.info
    http://obatkuatku.us
    http://dpbbmterbaru.link
    http://jilbabcantik.link
    http://paketinternet.link
    http://makassar.link
    http://nontonfilm21.link
    http://bioskop21.link
    http://ceritadewasa.asia
    http://wp.me/6Xads
    http://makassarkini.com
    http://www.google.com/+Makassarkini
    http://dengarlagu.top
    http://er-music.top
    http://vmax-id.top
    http://makassarwebs.com
    http://www.jadwal21.info

  8. Nonton Film Movie Cinema Bioskop says:

    http://www.bioskop21.id
    http://www.bioskop21.mobihttp://www.bioskop21.co
    http://www.movie25.link => Nonton Film Movie Cinema Bioskop 21 Online Gratis Subtitle Indonesia, watch free movie online, nonton film online gratis tanpa download, download film bioskop terbaru gratis, nonton drama korea
    online,nonton drama korea online indonesian subtitle,movie streaming online,download film cinema 21, movie25, putlocker, solarmovie, ganool.ag, bioskop21.id, watch32, theater 21, cineplex 21, watch movies online, watch free movies online movie25, classic movies,
    cinema movies, new movies, online movies, latest movies, download movies, movie8k, Synopsis Film Bioskop 21, Jadwal Tayang Film Bioskop 21, Nonton Film Bioskop 21 Online Gratis Subtitle Indonesia, watch free movies online, nonton film online gratis tanpa download,
    download film bioskop terbaru gratis, nonton drama korea online, nonton drama korea online indonesian subtitle, movie streaming online, download film cinema 21, Jadwal Film Tayang di Bioskop 21, Film Rilis Bioskop XXI, Daftar Film Terbaru Bioskop, Film Hollywood,
    Film Asia, Film Bollywood, Film Korea, Film Indonesia di Bioskop Seluruh Indonesia

  9. nonton film online says:

    http://m.ipsnews.be/en/article/15-years-gm-soybeans-argentina#comment-12894
    http://columbiaspectator.com/comment/1063663#comment-1063663
    https://www.commonwealmagazine.org/hes-got-their-number
    http://www.dailytoreador.com/lavida/students-share-internship-experiences/article_1587e9cc-5cf0-11e5-a716-9f55d5ef5b7a.html
    http://www.doublefine.com/news/comments/announcing_hack_n_slash_its_real_and_it_has_algorithms/
    https://en.greatfire.org/node/1955049

    http://speedupgetit.blogspot.com/2015/08/menggambar-dengan-pics-art.html?showComment=1456319367193#c6872476588932557216
    http://indieurban99.blogspot.com/2011/08/kripik-kentang.html#c1892574027126350262
    http://setabasri01.blogspot.com/2009/02/sistem-informasi-perpustakaan-gratis.html?showComment=1456320173926#c7023683671577891833
    http://djodobatik.blogspot.com/2009/02/tas-batik.html?showComment=1456320328994#c3739158673730076484
    http://tikdhtugas.blogspot.com/2015/08/langkah-langkah-pengerjaan-tugas-1.html?showComment=1456320462203#c9170706171842799536
    http://utsdivasekartaji.blogspot.com/2015/11/gadget-komentar-terbaru.html?showComment=1456320581316#c1788533575763535830
    http://oviedio.blogspot.com/2014/04/rangkaian-baterai-rc-qd.html?showComment=1456364794713#c5505250334646542388
    http://mini4wdmedan.blogspot.com/2009/12/membuat-batterey-charger.html?showComment=1456367260161#c8877117117312612575
    http://www.stjohnvianney-bexleyheath.org/Forums/Messages.aspx?ThreadID=243707#new
    http://www.weald.org/Forums/Messages.aspx?ThreadID=243708#new
    http://www.abundantlifeblackburn.co.uk/Forums/Messages.aspx?ThreadID=243709#new
    http://www.stmarys-rc-barnardcastle.org/Forums/Messages.aspx?ThreadID=243710#new
    http://www.trinitybaptistderby.com/Forums/Messages.aspx?ThreadID=243711#new
    http://www.barnwellbaptistchurch.org.uk/Forums/Messages.aspx?ThreadID=243712#new
    http://www.chippenhamchristianfellowship.co.uk/Forums/Messages.aspx?ThreadID=243713#new
    http://www.cgcbasildon.com/Forums/Messages.aspx?ThreadID=243714#new
    http://www.cairnshillmethodist.org/Forums/Messages.aspx?ThreadID=243715#new
    http://www.holywoodbaptist.org.uk/Forums/Messages.aspx?ThreadID=243716#new
    http://www.strichardshanworth.org/Forums/Messages.aspx?ThreadID=243717#new
    http://www.washingtoncatholic.org.uk/Forums/Messages.aspx?ThreadID=243718#new
    http://www.carlislechristianfellowship.org/Forums/Messages.aspx?ThreadID=243719#new
    http://ludlow.churchinsight.com/Forums/Messages.aspx?ThreadID=243720#new
    http://www.kingschurchprestwood.org/Forums/Messages.aspx?ThreadID=243721#new
    http://www.cornerstonechurchluton.co.uk/Forums/Messages.aspx?ThreadID=243722#new
    http://www.stannsbanstead.org.uk/Forums/Messages.aspx?ThreadID=243723#new
    http://www.olivetbaptistchurchdeptford.org/Forums/Messages.aspx?ThreadID=243724#new
    http://www.thelighthousechurch.org.uk/Forums/Messages.aspx?ThreadID=243725#new
    http://www.sttheodore-cranbrook.org/Forums/Messages.aspx?ThreadID=243726#new