I am a newbie to PowerShell and I am struggling to modify an output according to the way I want.
The command I run in MS Exchange Shell is this:
Get-Mailbox user1 | Get-ADPermission | ? {($_.ExtendedRights -like "*send-as*") -and -not ($_.User -like "NT AUTHORITY\SELF")} | Select User
The result I get from the above command is:
User
----
AGL\user4
AGL\user5
AGL\groupX
However I would like to obtain the output as:
User
----
user4
user5
groupX
Is it possible to do this?
Thanks heaps in advance.
For this, use a Calculated Property to output the objects with their names only: