From 9856d66634396b4a7db97a7a8b538cbc513233a7 Mon Sep 17 00:00:00 2001 From: Erik Date: Fri, 29 Nov 2024 09:08:30 -0700 Subject: [PATCH] I have no idea what changed. --- Active-Users.ps1 | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Active-Users.ps1 b/Active-Users.ps1 index 9b49996..4becc5e 100644 --- a/Active-Users.ps1 +++ b/Active-Users.ps1 @@ -1,5 +1,5 @@ -$ADUsers = Get-ADUser -Filter '(mail -like "*mpe.ca")' -Properties mail,title,office -SearchBase 'OU=MPEUsers,DC=mpe,DC=ca' | ` - where name -NotMatch 'Mailbox|Migration|Federated|Boardroom|Presentation|Survey|Conferences|room|safety|helpdesk|sask|quality|vacation|holiday' | select surname, GivenName, name, mail, title,samaccountname +$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' -$ADUsers | Select-Object name,title,mail,GivenName,surname | sort-object name | Export-Csv -Path '.\Active-Users.CSV' -NoTypeInformation +$ADUsers | Select-Object name,title,mail,GivenName,surname,extensionAttribute1,mobile,telephoneNumber, office | sort-object name | Export-Csv -Path '.\Active-Users.CSV' -NoTypeInformation