I’m trying to export the list of computers from an OU by using below command.
Get-adcomputer -filter * -searchbase “Distinguished Name of the path” | select name
I’m able to get the results if there is no security group inside the OU but if there is any security inside OU and if the SG contains the computer objects i don’t get results.
Domain Name->OU->Computer = Works
Domain Name->OU->Secuity Group->Computer = Not works
Is how powershell works or do i make any mistake in the above command? Thanks in advance!