I am trying to hide a few mailboxes from a Global Address List using the -HiddenFromAddressListsEnabled parameter, but each time I attempt to use it, I get an error.
I'm new to using Powershell, but I was able to get it connected to the proper domain. If I run the "Get-Mailbox" command, our mailboxes show up. When I try to run the command to hide the mailbox -- Set-Mailbox <MailboxID> -HiddenFromAddressListsEnabled $true -- then I get the following error.
A positional parameter cannot be found that accepts argument '-HiddenFromAddressListsEnabled'.
+ CategoryInfo : InvalidArgument: (:) [Set-Mailbox], ParameterBindingException
+ FullyQualifiedErrorId : PositionalParameterNotFound,Set-Mailbox
I'm confident the UserID variable is right in the command because if I run the command Set-Mailbox <MailboxID>, then the command returns with a message --
"The command completed successfully but no settings of <MailboxID> have been modified."
At this point, I'm stumped... help?
Thanks!
Vic