Hey y’all, Mark here with a quick post that all you PowerShell slackers should check out. Ashley McGlone aka GoateePFE (I've seen his goatee in real life and it is magnificent) has written up a nice little doc to help you finally let go of all your old commands for Active Directory and how to do the exact same thing or better in PowerShell. These old commands are starting to go away. You can already promote a DC using nothing but PowerShell as Greg Jaworski showed you here. So print out this cube sheet and get to learning! You've probably dropped a New Year's Resolution already so add this instead, we wont tell.
Mark "flowing locks PFE" Morowczynski
One of the most usefull commands for AD admin, "netdom query fsmo" has THIS alternative?!?
Get-ADForest | Select-Object DomainNamingMaster, SchemaMaster
Get-ADDomain | Select-Object InfrastructureMaster, PDCEmulator, RIDMaster
No SINGLE command to query that?!? OMG... This is going the wrong way...
If you just run the Get-ADForest or Get-ADDomain, both of these cmdlets will show you the relevant FSMOs. To me, that does the job and that's less typing than the netdom command. If you want to narrow your search, like you are doing in your example above, then you could star (*) search the returning objects to lessen the typing a bit. for e.g
Get-ADForest | Select domainn*,sc*
Get-ADDomain | Select ri*,pd*,in*
Hopefully that's still somewhat comparable to netdom way if you take the tab completion for the the actual cmdlets into account :)
Although you're right that powershell command might get shorter, I still see at least 4 netdom advantages:
1. You require only 1 netdom command to query ALL FSMO roles for domain you're in.
You need 2 commands in PowerShell
2. netdom is present by default on all Win2008+ machines and Win200X with Support Tools installed.
PowerShell is not present on Win2003 machines.
3. You have to import ActiveDirectory module, which is not present on member servers, so you cannot query FSMO roles from member server.
4. netdom syntax is easier.
Having this into account, what will it be? Highway or new way?
I choose NETDOM!
Can we get a nice little doc on 'how to grow your own magnificent goatee'?
How to grow your own magnificent goatee?
Here are my tips:
1. Don't cut it. Sounds simple. Be careful shaving around the edges of the goatee.
2. Be patient. Once you hit six inches it will develop a flow and look less fuzzy.
3. Use caution when zipping up your winter coat. Enough said.
4. Never sleep unguarded around non-goatee-supporting family members. Remember the story of Samson.
5. Register your mug shot at www.beards.org. We need more goatee representation.
Unleash the magnificence!