tail -f /dev/null

If you haven't had any obstacles lately, you're not challenging. be the worst.

ADSI 経由で Active Directory への疎通を確認する

AD 管理 Tools の install

Server Manager を起動する.

Active Directory Domain Services > Remote Server Administration Tools > Role Administration Tools > AD DS and AD LDS Tools のトグルを開き Active Directory module for Windows PowerShell を install.

Add Roles and Features Wizard

Select server roles

Installation Progress

PowerShell を新規 session で開き, 上記 tool の module が存在することを確認する.

PS> Get-Module -ListAvailable Active*

    Directory: C:\Windows\system32\WindowsPowerShell\v1.0\Modules

ModuleType Version    Name                                ExportedCommands
---------- -------    ----                                ----------------
Manifest   1.0.1.0    ActiveDirectory                     {Add-ADCentralAccessPolicyMember, Add-ADComputerServiceAccount, Add-ADDomainControllerPasswordReplicationPolicy, Add-ADFineGrained...

疎通確認

DirectoryEntry class で AD への疎通を確認する.

$user = "ad-test\test-intra"
$pass = "xxx"
$ldap='LDAP://ad.test.com/CN=Users,DC=ad,DC=test,DC=com'
New-Object System.DirectoryServices.DirectoryEntry($ldap, $user, $pass)

distinguishedName : {CN=Users,DC=ad,DC=test,DC=com}
Path              : LDAP://ad.test.com:389/CN=Users,DC=ad,DC=test,DC=com