How to omit powershell parameter from cmdlet if value not provided?
问题 I'm trying to execute a below Powershell command to create a new address list on exchange server with parameters like Name, Container, etc. Container is an optional input/parameter, how do I omit it from cmdlet if its value is not provided? I tried with IF conditionals but but does not seems working. Any help here? New-AddressList -Name -Container \test MyAddressList5 -ConditionalStateOrProvince maha -IncludedRecipients MailboxUsers 回答1: You can pass needed parameters with their corresponding