User Profile
Tlu01
Copper Contributor
Joined 5 years ago
User Widgets
Recent Discussions
Re: How to pipe a result from one command to another for Office 365 powershell
Thanks, Vasil. Still learning about PowerShell scripts. I did have to remove the shared in the script for it to work. Get-MailboxPermission “Shared mailbox” | Where-Object { ($_.IsInherited -eq $False) -and -not ($_.User -like “NT AUTHORITY\SELF”) } | select User,@{n="DisplayName";e={(Get-Recipient $_.User).displayName}} | Export-Csv "sharedmailbox.csv" -nti1.8KViews0likes0CommentsHow to pipe a result from one command to another for Office 365 powershell
I need to show the name of users with full permission access to a shared mailbox. I found the script to export the user list, however it only shows the user ID in O365, not the Display name. I found another script that can convert the user ID to Display name. How can I link them together so I don't have to run two separate scripts to get the final result? Script one to export out the User ID: Get-MailboxPermission “Shared mailbox” | Where-Object { ($_.IsInherited -eq $False) -and -not ($_.User -like “NT AUTHORITY\SELF”) } | Select-Object user | Export-Csv "sharedmailbox.csv" Script two to convert the user ID to Display Name: Import-Csv "sharedmailbox.csv" | foreach{Get-Mailbox -ResultSize Unlimited -Identity $_.user} | select *DisplayName* | Export-csv "sharedmailbox-Displayname.csv" Thank you.Solved1.8KViews0likes4Comments
Recent Blog Articles
No content to show