Tinus EngOps Wiki

Logo

OpsaC - Operating as PowerShell code

Links

Home

IT-Wiki

PowerShell Blog

PowerShell Index

PowerShell Search

Additional Websites

View my GitHub Profile

View my GitHub Gists

View my Codeberg Page

View my Photo Website

Active Directory prüfen

published: March 17, 2015 author: Tinu tags: Active Directory categories: Active Directory


Wenn ein DC promoted wurde, sollte dieser überprüft werden.

Datenbank und Log

SYSVOL-Folder anzeigen

Im SYSVOL werden die Policies und Scripts domain-wide abgelegt.

ls (get-wmiobject -class win32_share -computer . | `
where-object {$_.Name -eq 'SYSVOL'}).Path |  ` 
select Name, FullName, Length, LastWriteTime, CreationTime | ft -auto

Inhalt vom Folder NTDS auflisten

ntds.dit ist die Active Directory Datenbank

$key = "hklm:\SYSTEM\CurrentControlSet\Services\NTDS\parameters"
ls (Get-ItemProperty $key).'Database log files path' |  `
select Name, FullName, Length, LastWriteTime, CreationTime | ft -auto

Allgemeine DC Checks

dcdiag

Replikations Checks

repadmin /showrepl
repadmin /replsummary
repadmin /syncall

Active Directory Replication

$dc = (read-host 'Enter DC name')
Get-ADReplicationFailure $dc

Alle DCs einer Site

$dc = (read-host 'Enter DC name')
Get-ADReplicationFailure -scope SITE -target $dc | FT Server, FirstFailureTime, `
FailureClount, LastError, Partner -AUTO

Replication auf Attribute

$dc = (read-host 'Enter DC name')
$domainDN = (Get-ADDomain).DistinguishedName
Get-ADReplicationAttributeMetadata -Object "CN=Domain Admins,CN=Users,$($domainDN)" `
-Server $dc -ShowAllLinkedValues | ft

Inbound Replication vom Partner DC

$dc = (read-host 'Enter DC name')
Get-ADReplicationPartnerMetadata -target $dc | Select LastChangeUsn, `
LastReplicationResult, LastReplicationSuccess, Partition, Server,  
PartnerType, PartnerAddress | ft -auto

Replication in der Queue

$dc = (read-host 'Enter DC name')
Get-ADReplicationQueueOperation -server $dc

Domain Controller prüfen

Get-EventLog -list | select Log
$logname = `(read-host 'Enter the Logname')`
Get-EventLog -LogName $logname -Newest 20 | ft -auto

← Previous Post ◇ [ Top ] ◇ Copyright © 2024 by tinuwalther ◇ [ Blog ] ◇ Next Post →