Hi experts i am using exchange hybrid environment, i want to pull this report for Office365 users, i am using the below script and it works fine but i want to add FirstName,LastName,Primary email address, Secondary email address, EmployeeID, Job Title, and OWA enabled or disabled<\/strong> to this script. How do i add to this PS1<\/p>\n
foreach($users in Get-Mailbox -ResultSize Unlimited){$users | Foreach-Object { There is no attribute named EmployeeID<\/strong>, please check which attribute you use as EmployeeID.<\/strong><\/p>\n Hi experts i am using exchange hybrid environment, i want to pull this report for Office365 users, i am using the below script and it works fine but i want to add FirstName,LastName,Primary email address, Secondary email address, EmployeeID, Job Title, and OWA enabled or disabled<\/strong> to this script. How do i add to this PS1<\/p>\n foreach($users in Get-Mailbox -ResultSize Unlimited){$users | Foreach-Object { We can use get-user to get firstname , lastname and tltle:<\/p>\n The script should be like this:<\/p>\n $a=get-user $user.name<\/p>\n FirstName=$a.firstname<\/p>\n LastName=$a.lastname<\/p>\n …<\/p>\n You also can use get-user user| fl to check other info you want.<\/p>\n By that analogy,<\/p>\n Get-mailbox can get the EmailAddresses, it should be like:<\/p>\n EmailAddresses : {SMTP:[email protected], smtp:[email protected]<\/a>}<\/p>\n Get-CASMailbox can get OWAEnabled info.<\/p>","upvoteCount":0,"datePublished":"2018-10-11T01:30:23.000Z","url":"https://community.spiceworks.com/t/mailboxreport/677876/2","author":{"@type":"Person","name":"jaycekakay","url":"https://community.spiceworks.com/u/jaycekakay"}},{"@type":"Answer","text":" I have added the below two lines in the script but i am not getting , help me how to add email id, employeeid and job titile and owa status to the script<\/p>\n FirstName = $User.FirstName<\/p>\n LastName = $User.LastName<\/p>","upvoteCount":0,"datePublished":"2018-10-11T02:34:34.000Z","url":"https://community.spiceworks.com/t/mailboxreport/677876/3","author":{"@type":"Person","name":"risingflight","url":"https://community.spiceworks.com/u/risingflight"}},{"@type":"Answer","text":" Apart from this, you can refer to Kernel Exchange Reporter<\/strong> tool for a detailed information about Exchange Server. It generates more than 80+ types of reports. To know more about Exchange Reporting tool<\/a> , visit: Exchange Reporter to Monitor & Generate Reports of Exchange Server Activities<\/a><\/p>","upvoteCount":0,"datePublished":"2018-10-11T08:50:22.000Z","url":"https://community.spiceworks.com/t/mailboxreport/677876/5","author":{"@type":"Person","name":"rupesh-lepide","url":"https://community.spiceworks.com/u/rupesh-lepide"}},{"@type":"Answer","text":" I can see in Active Directory<\/p>\n Active Directory - Find- Advanced -Click Fields-User-Employee ID<\/p>\n i have added the below line in PS1 but i did not get any output<\/p>\n EmployeeID = $user.EmployeeID<\/p>","upvoteCount":0,"datePublished":"2018-10-11T16:42:52.000Z","url":"https://community.spiceworks.com/t/mailboxreport/677876/6","author":{"@type":"Person","name":"risingflight","url":"https://community.spiceworks.com/u/risingflight"}},{"@type":"Answer","text":"
\n$user = $_
\n$stats = Get-MailboxStatistics $user.Name
\nNew-Object -TypeName PSObject -Property @{
\nDisplayName = $User.DisplayName
\nIssueWarningQuota = $User.IssueWarningQuota
\nProhibitSendQuota = $User.ProhibitSendQuota
\nProhibitSendReceiveQuota = $User.ProhibitSendReceiveQuota
\nTotalItemSize = $stats.TotalItemSize
\nAuditEnabled = $User.AuditEnabled
\n}
\n}
\n}<\/p>","upvoteCount":3,"answerCount":7,"datePublished":"2018-10-10T15:27:31.000Z","author":{"@type":"Person","name":"risingflight","url":"https://community.spiceworks.com/u/risingflight"},"acceptedAnswer":{"@type":"Answer","text":"
foreach($users in Get-Mailbox -ResultSize Unlimited){$users | Foreach-Object { \n$user = $_\n$stats = Get-MailboxStatistics $user.Name\n$a=get-user $user.name\n$b=Get-CASMailbox $user.name \nNew-Object -TypeName PSObject -Property @{ \nDisplayName = $User.DisplayName\n\nFirstName = $a.FirstName\nLastName = $a.lastname\nEmailAddress = $user.EmailAddresses\nJobTitle = $a.title\nOWAEnable = $b.OWAenabled\nIssueWarningQuota = $User.IssueWarningQuota \nProhibitSendQuota = $User.ProhibitSendQuota \nProhibitSendReceiveQuota = $User.ProhibitSendReceiveQuota \nTotalItemSize = $stats.TotalItemSize\nAuditEnabled = $User.AuditEnabled \n} \n}\n}\n\n<\/code><\/pre>","upvoteCount":0,"datePublished":"2018-10-11T05:20:02.000Z","url":"https://community.spiceworks.com/t/mailboxreport/677876/4","author":{"@type":"Person","name":"jaycekakay","url":"https://community.spiceworks.com/u/jaycekakay"}},"suggestedAnswer":[{"@type":"Answer","text":"
\n$user = $_
\n$stats = Get-MailboxStatistics $user.Name
\nNew-Object -TypeName PSObject -Property @{
\nDisplayName = $User.DisplayName
\nIssueWarningQuota = $User.IssueWarningQuota
\nProhibitSendQuota = $User.ProhibitSendQuota
\nProhibitSendReceiveQuota = $User.ProhibitSendReceiveQuota
\nTotalItemSize = $stats.TotalItemSize
\nAuditEnabled = $User.AuditEnabled
\n}
\n}
\n}<\/p>","upvoteCount":3,"datePublished":"2018-10-10T15:27:31.000Z","url":"https://community.spiceworks.com/t/mailboxreport/677876/1","author":{"@type":"Person","name":"risingflight","url":"https://community.spiceworks.com/u/risingflight"}},{"@type":"Answer","text":"