Hi guys, creating a function to work with 365 that gathers input to retrieve mailbox info. At present it only has one working option – Search for a specific user mailbox or leave blank for all.
What I want to get is an option to include ProhibitSendQuota (max mailbox capacity as opposed to current usage).
Lines 6/7 are a new section I’ve added using bool values as a yes/no to include ProhibitSendQuota in Select-Object.
{Get-Mailbox | Get-MailboxStatistics | Select-Object DisplayName, ` IsArchiveMailbox, ItemCount, TotalItemSize | Format-Table –autosize}
Once a Y/N has been collected as a Boolean value, how can I then make the rest of the script utilise this value to either include or omit the ProhibitSendQuota parameter?
Thanks guys!
P.S. sorry if this is confusing, please ask if I haven’t made anything clear!
submitted by /u/tastydoosh
[link] [comments]
The post If/Else with multiple criteria appeared first on How to Code .NET.