question

darshankumar-0232 avatar image
0 Votes"
darshankumar-0232 asked LimitlessTechnology-2700 answered

Need PS script to find out which ID has been used to add system to domain

Hi

I need a PS script to find out who added system to domain, i am able to get hostname created & last logon date.

windows-server-powershell
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

AndreasBaumgarten avatar image
1 Vote"
AndreasBaumgarten answered

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)

Regards
Andreas Baumgarten

5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

LimitlessTechnology-2700 avatar image
0 Votes"
LimitlessTechnology-2700 answered

Hi there,

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 : )

5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.