PowerShell で Active Directory のベースDNを取得する
ドメイン ユーザーでログオンしている必要がある。
$objRoot = [ADSI]("LDAP://rootDSE")
$basedn = $objRoot.defaultNamingContext
$objRoot = [ADSI]("LDAP://rootDSE")
$basedn = $objRoot.defaultNamingContext