How to get all the account details using Get-MailBox
If you're new to PowerShell I suggest you look at some of the resources here. Apart from that you probably want to use Get-Member
, Select-Object
and/or Format-List
. Perhaps doing something like:
PS> Get-MailBox | Get-Member
a load of properties and methods will be scrolling by you can select the properties you wish to see using something like
PS> Get-MailBox | Select-Object Alias
To get all available information you could use Format-List
with the *
glob like so:
PS> Get-MailBox | Format-List *
I don't have acces to an Exchange environment so I can't provide any specific examples I'm afraid.
Comments
-
Hiren over 3 years
I know this is silly question but I am new with Powershell cmdlet.
I want all details of user of a mailbox. I am using
Get-MailBox
but I just get Alias name and name there, but I want all the details. I can't find any parameter for that even. Is there any way??Thank You-
Glenn Slaven over 12 yearsWhat other details are you wanting?
-
Hiren over 12 yearsI want First Name ,Last Name and almost all the properties.Because we create email address with help of first name and last name so I cant change only email address with different first name and last name.I hope You can understand this .Thank You.
-
-
Hiren over 12 yearsThanks For great help,Its working great with Powershell.Now I get all details with that command .Now I am looking for appropriate code in C# .As Format-List is not parameter I am confuse how to code it with C#.
-
Hiren over 12 yearsThis Is the solution Command cmdSetMailbox = new Command("Get-MailBox"); cmdSetMailbox.Parameters.Add("Identity", txtName.Text); Command cmd = new Command("Select-Object"); string[] Parameter = new string[] {"Alias","DisplayName"}; cmd.Parameters.Add("Property",Parameter);
-
Adam Winter over 2 yearsOut-GridView opened an new powershell window for every object. This could crash your server with RAM usage if the list is long enough.