Hello @Ramanjaneyulu Butharaju
This should be simple:
Import-module activedirectory
Get-ADUser -Filter * -SearchBase "OU=Abc, DC=example, DC=com" | Select sAMAccountName, name | export-csv -Path c:\Scripts\Users.csv
You can use other select properties from: https://social.technet.microsoft.com/wiki/contents/articles/12037.active-directory-get-aduser-default-and-extended-properties.aspx
Like:
Import-module activedirectory
Get-ADUser -Filter 'Company -like "Alpha*"' -Properties * | Select -Property EmailAddress,GivenName,Surname,DisplayName,Title,Department,Office,OfficePhone,MobilePhone,Fax,StreetAddress,City,State,PostalCode,Country | Export-CSV " c:\Scripts\Users.csv" -NoTypeInformation -Encoding UTF8
Hope this resolves your query,
Best regards,