Pull or Export Active Directory computer objects in a csv file.
I've used filter abc* in command. Please change it as per your needs.
DSQUERY Computer "OU=Computers,DC=childdomainname,DC=domainname,DC=local" -name abc* -scope subtree -limit 0 > C:\ComputerOU.csv
Get-ADComputer -Filter * -Property * | Format-Table Name,OperatingSystem -Wrap –Auto
I've used filter abc* in command. Please change it as per your needs.
DSQUERY Computer "OU=Computers,DC=childdomainname,DC=domainname,DC=local" -name abc* -scope subtree -limit 0 > C:\ComputerOU.csv
If you are a Powershell user. Please use below command yet this require Active Directory Module import on client before gets executed or better be executed on server itself for no errors.
Will return computer name and OS information only.
Get-ADComputer -Filter * -Property * | Format-Table Name,OperatingSystem -Wrap –Auto
No comments:
Post a Comment