Forum Discussion

emreozanmemis's avatar
emreozanmemis
Steel Contributor
Jan 19, 2022

PowerShell ile Actice Directory Domain Services Bilgi Yonetimi (tr-TR)

PowerShell ile Active Directory Domain Services yonetimine detay bilgi için bir kaç komut ile ulaşmak kolay ve pratik olacaktır. Örnek paylaşımlarla sizlerinde AD DS komutlarını pipe yardımıyla kullanarak istediğiniz veriyi çekmeniz için yol göstermeye çalışacağım.

 

AD DS sunucunuzda hangi forest domain modu, ve netbiosname gibi detayları rahatlıkla görüntüleyebileceğiniz bir komut ile başlayalım.

 

get-addomain | select forest,domainmode,parentdomain,netbiosname,PDCEmulator

Komut çıktısı:

PS C:\Users\Administrator> get-addomain | select forest,domainmode,parentdomain,netbiosname,PDCEmulator
 
 
forest       : emreozanmemis.com
domainmode   : Windows2016Domain
parentdomain :
netbiosname  : emreozanmemis
PDCEmulator  : dc.emreozanmemis.com

 

Root domain, domian ve schema master gibi detayları görüntülemek için kullanabilirsiniz.

 

get-adforest | select name,rootdomain,domainnamingmaster,schemamaster

Komut çıktısı:

PS C:\Users\Administrator> get-adforest | select name,rootdomain,domainnamingmaster,schemamaster
 
name     rootdomain domainnamingmaster schemamaster
----     ---------- ------------------ ------------
ozan.com ozan.com   dc.ozan.com        dc.ozan.com

 

get-adforest | get-member

Komut çıktısı:

PS C:\Users\Administrator> get-adforest | get-member
 
 
   TypeName: Microsoft.ActiveDirectory.Management.ADForest
 
Name                  MemberType            Definition
----                  ----------            ----------
Contains              Method                bool Contains(string propertyName)
Equals                Method                bool Equals(System.Object obj)
GetEnumerator         Method                System.Collections.IDictionaryEnumerator GetEnumerator()
GetHashCode           Method                int GetHashCode()
GetType               Method                type GetType()
ToString              Method                string ToString()
Item                  ParameterizedProperty Microsoft.ActiveDirectory.Management.ADPropertyValueCollection Item(stri...
ApplicationPartitions Property              Microsoft.ActiveDirectory.Management.ADPropertyValueCollection Applicati...
CrossForestReferences Property              Microsoft.ActiveDirectory.Management.ADPropertyValueCollection CrossFore...
DomainNamingMaster    Property              System.String DomainNamingMaster {get;}
Domains               Property              Microsoft.ActiveDirectory.Management.ADPropertyValueCollection Domains {...
ForestMode            Property              System.Nullable`1[[Microsoft.ActiveDirectory.Management.ADForestMode, Mi...
GlobalCatalogs        Property              Microsoft.ActiveDirectory.Management.ADPropertyValueCollection GlobalCat...
Name                  Property              System.String Name {get;}
PartitionsContainer   Property              System.String PartitionsContainer {get;}
RootDomain            Property              System.String RootDomain {get;}
SchemaMaster          Property              System.String SchemaMaster {get;}
Sites                 Property              Microsoft.ActiveDirectory.Management.ADPropertyValueCollection Sites {get;}
SPNSuffixes           Property              Microsoft.ActiveDirectory.Management.ADPropertyValueCollection SPNSuffix...
UPNSuffixes           Property              Microsoft.ActiveDirectory.Management.ADPropertyValueCollection UPNSuffix...

 

get-aduser -filter {givenname -eq "ozan"}

Komut çıktısı:

PS C:\Users\Administrator> get-aduser -filter {givenname -eq "ozan"}
 
 
DistinguishedName : CN=Ozan Memis,CN=Users,DC=ozan,DC=com
Enabled           : True
GivenName         : Ozan
Name              : Ozan Memis
ObjectClass       : user
ObjectGUID        : b22c5a5a-c34a-4985-897c-3370684fbcf6
SamAccountName    : ozan
SID               : S-1-5-21-3008493339-2345538161-2876662669-1149
Surname           : Memis
UserPrincipalName : Email address removed
No RepliesBe the first to reply

Resources