Find computers joined to the domain by a specific user

2011/01/23 | less than 1 minute read |

Here is a quick PowerShell tip to retrieve the computers created in Active Directory by a specific user

With ActiveDirectory module

## Find computers joined to the domain by a specific user
$UserName = Read-Host -Prompt "Enter username"
$UserSID = (Get-ADUser $UserName -Property objectsid).objectsid
Get-ADComputer -SizeLimit 0 -LdapFilter "(&(objectcategory=computer)(mS-DS-CreatorSid=$UserSID)"

With Quest Active Directory

## Find computers joined to the domain by a specific user
$UserName = Read-Host -Prompt "Enter username"
$UserSID = (Get-QADUser -Identity $UserName -IncludeAllProperties).objectsid
Get-QADComputer -SizeLimit 0 -LdapFilter "(&(objectcategory=computer)(mS-DS-CreatorSid=$UserSID)"

Leave a comment