2024-11-29 09:08:30 -07:00
|
|
|
$ADUsers = Get-ADUser -Filter '(mail -like "*mpe.ca")' -Properties mail,title,office,extensionAttribute1,mobile,telephoneNumber -SearchBase 'OU=MPEUsers,DC=mpe,DC=ca' | `
|
|
|
|
where name -NotMatch 'Mailbox|Migration|Federated|Boardroom|Presentation|Survey|Conferences|room|safety|helpdesk|sask|quality|vacation|holiday'
|
2023-09-14 11:13:58 -06:00
|
|
|
|
2024-11-29 09:08:30 -07:00
|
|
|
$ADUsers | Select-Object name,title,mail,GivenName,surname,extensionAttribute1,mobile,telephoneNumber, office | sort-object name | Export-Csv -Path '.\Active-Users.CSV' -NoTypeInformation
|
2023-09-14 11:13:58 -06:00
|
|
|
|