Get-ADUser Filter Help
I am trying to get the following script to only query objects that have a job title. Is that possible?
Get-ADUser -filter * -properties * | select @{Name="Username";Expression={$.EmailAddress}},@{Name="First name";Expression={$.Givenname}},@{Name="Last name";Expression={$.Surname}},@{Name="E-mail";Expression={$.Mail}},@{Name="Job Title";Expression={$.Title}},@{Name="Direct Manager";Expression={(get-aduser -property emailaddress $.manager).emailaddress}} | export-csv "C:\export.csv" -NoTypeInformation
Posted Jan 7, 2022, 11:57 PM UTC
howdy y'all,
for those who wanna read that hot mess without getting a headache [grin] ...
take care,
lee