Exporting attributes from Active Direcotory
Import-module ActiveDirectory
Get-ADUser -Filter * -SearchBase "OU=Others,OU=traveling,OU=Employees,dc=Aryan,DC=net" -Properties givenname,sn,sAMAccountName,mail,mobile,manager,telephonenumber,title | Select givenname,sn,sAMAccountName,mail,mobile,manager,telephonenumber,title | Export-CSV "C:\Scripts\Exporting_Users_From_AD\Travelling_Others.csv"
Get-ADUser -Filter * -SearchBase "OU=Others,OU=traveling,OU=Employees,dc=Aryan,DC=net" -Properties givenname,sn,sAMAccountName,mail,mobile,manager,telephonenumber,title | Select givenname,sn,sAMAccountName,mail,mobile,manager,telephonenumber,title | Export-CSV "C:\Scripts\Exporting_Users_From_AD\Travelling_Others.csv"
Comments
Post a Comment