Tag Archives: AD DS

Find existing UPN in Forest

A userPrincipalName (UPN) must be unique in a Active Directory Forest. To check for an existing UPN use the following lines. The powershell script expects that all DC’s within the Root Domain are GC enabled . $RootDomain = "Contoso.com" $DomainControllerRoot … Continue reading

Posted in Information Technology | Tagged , , | Comments Off on Find existing UPN in Forest

Force replication on all domain controller of a domain

The following line searches for all Domain Controllers of a Domain . Then it filters some Computers by IP (10.10.10.*) to eliminate RODCs and finally forces replication on each remaining Domain Controller. $Domain = "Contoso.com" Get-ADDomainController -Filter * -server $Domain … Continue reading

Posted in Information Technology | Tagged , , | Comments Off on Force replication on all domain controller of a domain

Get Domain from distinguished Name

Get Domain from FQDN: get-domfqdn “CN=Test,OU=Orgunit,DC=contoso,DC=test” will result in contoso.test function get-domfqdn ($fqdn)  {  $afqdn= $fqdn.split(",")  $first = 0  $Dom=""  foreach ($pfqdn in $afqdn)   {   If ($pfqdn.contains("DC=") -eq $true)    {    If ($first -eq 1)     {            $Dom = $Dom+"."     } … Continue reading

Posted in Information Technology | Tagged , , | Comments Off on Get Domain from distinguished Name

What ADDS Site

To find out in what ADDS site a computer is running use the following  command nltest [/server:<remote computer name>] /dsgetsite

Posted in Information Technology | Tagged | Comments Off on What ADDS Site

ADDS Dump thumbnailPhoto to JPG file

Use this command line in Powershell to save a users thumbnailPhoto to a file. First start a Powershell session with Active Directory Modules loaded, then: get-aduser “sAMAccountname” -server “FQDN Domain Controller”-properties thumbnailPhoto | select -expandproperty thumbnailphoto | set-content -path “JPG … Continue reading

Posted in Information Technology, Tips | Tagged , | Comments Off on ADDS Dump thumbnailPhoto to JPG file

Clear Protected from accidental deletion flag

Windows Active Directory protects per default Organizational Units (OU) from accidential deletion . To clear this flag for an entire OU structure you can use this Powershell commands . This example command will remove the flag from an OU structure … Continue reading

Posted in Information Technology, Tips | Tagged , | Comments Off on Clear Protected from accidental deletion flag

DNS Reverslookup Nameserver remove hangup

Problem While cleaning up nameserver entries in reverse lookup scopes dns GUI shows a popup asking ” Do you want to delete the glue record” and hangs. Solution

Posted in Fix IT, Information Technology | Tagged , , | Comments Off on DNS Reverslookup Nameserver remove hangup