About
Pricing
Community
Teams
Start Free Trial
Log in
Fr. Vandecan
asked on
11/6/2017
Powershell - Get-mailbox what's wrong in this statement?
$Item.Code_Site = "LO"
$JCAlias = (Get-Mailbox -RecipientTypeDetails sharedmailbox | Where-object {($_.CustomAttribute1 -eq $Item.Code_Site)}.Alias)
ERROR : The property Alias cannot be found on this object. Verify that the property exist....
Get-Mailbox has a property called alias..
so something is wrong in my statement.....
PS I I remove .alias I get the name of the mailbox
$JC = Get-Mailbox -RecipientTypeDetails sharedmailbox | Where-object {($_.CustomAttribute1 -eq $Item.Code_Site)}
BUT this is not what I need....
Powershell
Exchange
Active Directory
4
2
Last Comment
Jeremy Weisinger
8/22/2022 - Mon
ASKER CERTIFIED SOLUTION
oBdA
11/6/2017
THIS SOLUTION ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
GET A PERSONALIZED SOLUTION
Ask your own question & get feedback from real experts
Find out why thousands trust the EE community with their toughest problems.
SOLUTION
Jeremy Weisinger
11/6/2017
THIS SOLUTION ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
GET A PERSONALIZED SOLUTION
Ask your own question & get feedback from real experts
Find out why thousands trust the EE community with their toughest problems.
oBdA
12/5/2017
Suggest a split. Both are valid solutions, just two ways to achieve the same thing.
Jeremy Weisinger
12/10/2017
Both valid.
I should also clarify that the original question had the wrong syntax. oBdA’s syntax is, of corse, correct.
Experts Exchange has (a) saved my job multiple times, (b) saved me hours, days, and even weeks of work, and often (c) makes me look like a superhero! This place is MAGIC!
Walt Forbes