Back in March I’ve made a post that Project Methos was finished (which involved me starting my own company Methos IT) and that I was starting a new project: Blue Lantern.
So, what is Project Blue Lantern? It’s a PowerShell book (written by me, in English).
This book will be based on my own learning experiences while learning PowerShell but also as a reference guide.
The last couple of months I spend making notes, gathering information but mostly playing around with PowerShell 3.0.
I’ve done this to make this book PowerShell 3.0 ready and put as much of content in there as I possibly could.
The book will include lots of practical examples, answers to the ‘why’ + ‘how’ questions and most of all… it will make you think
about the possibilities PowerShell offers you and combining the different kinds of knowledge you’ve learned throughout the book and in your career.
So, I’ve reserved a lot of time in my calendar in the upcoming months to write the book and will keep you guys posted on the progress.
Some time ago I was asked to write a script which does an inventory of an active directory, such as finding all domain controllers, all global catalog servers, all sites/subnets, etc…
I will not be posting the entire script, instead I’ve chosen to offer you some oneliners which accomplish parts of it.
The first one is to get the Active Directory forest mode:
Get-ADForest | Select-Object -ExpandProperty ForestMode
The second one is to get the Active Directory domain mode:
Get-ADDomain | Select-Object -ExpandProperty ForestMode
The third one is to find all Domain Controllers (specific: their names), which can be done with a single PowerShell cmdlet:
Get-ADDomainController
The next one is to find all Global Catalog servers. You can do this by using the Get-ADDomainController, added by a filter:
Get-ADDomainController -Filter {IsGlobalCatalog -eq $true}
And to find all Read-Only Domain Controllers (RODC) you can do this the same way but with a different property:
Get-ADDomainController -Filter {IsReadOnly -eq $true}
And last has to do with Active Directory replication. To find all automatic created connections:
Get-ADReplicationConnection -Filter {AutoGenerated -eq $true}
AD Replication is very smart, but still people want to try and be smarter by creating manual connections for the replication.
So, to find the connections that someone may have created manually:
Get-ADReplicationConnection -Filter {AutoGenerated -eq $false}
I hope that you find the above useful

Categories
Tag Cloud
Blog RSS
Comments RSS
Last 50 Posts
Back
Void « Default
Life
Earth
Wind
Water
Fire
Light 