Quantcast
Channel: PowerShell.com – PowerShell Scripts, Tips, Forums, and Resources
Viewing all articles
Browse latest Browse all 6937

Query Active Directory for Computer Name

$
0
0

I am trying to come up with Powershell script that will query a particular OU in Active Directory and export the computer names, Last Logged on user, and the description to a CSV file. I would like to exclude the full distinguished name and only show the computer names, last logged on user and the description.


Get-ADComputer -SearchBase "OU=No-Policy Computers, OU=JAMCO,OU=NARMCO,DC=JAMED,DC=dp,DC=Lumy,DC=org" -Filter * -Property name,description


Viewing all articles
Browse latest Browse all 6937

Trending Articles