I need a PS script to find out who added system to domain, i am able to get hostname created & last logon date.
Hi @darshankumar-0232 ,
as far as I know there is no attribute in AD for the computer class storing the information who added the computer in AD domain.
(If the reply was helpful please don't forget to upvote and/or accept as answer, thank you)
Get domain information from Active Directory
PS C:\> Get-ADDomain -Identity user.com
This command gets the domain information for the domain user.com.
Get domain information of the current local computer domain
PS C:\> Get-ADDomain -Current LocalComputer
This command gets the domain information of the current local computer domain.
This link might be helpful for you https://docs.microsoft.com/en-us/powershell/module/activedirectory/get-addomain?view=windowsserver2019-ps
Hope this answers all your queries, if not please do repost back.
If an Answer is helpful, please click "Accept Answer" and upvote it : )
18 people are following this question.