Hi
im trying to create an array that will hold 4 exchange databases info in it.
for so I start with:
@dbs=get-mailboxdatabase db1
works fine
then I try to add more databases like this but I get errors:
@dbs +=get-mailboxdatabase db2
Method invocation failed because [Microsoft.Exchange.Data.Directory.SystemConfiguration.MailboxDatabase] doesn't contain a method named 'op_ Addi tion'.
At line:1 char:8
+ $dbs += <<<< (Get-MailboxDatabase db2)
+ CategoryInfo : InvalidOperation: (op_Addition:String) [], RuntimeException
+ FullyQualifiedErrorId : MethodNotFound
what am I missing here?
should I create an empty array first and then add them into it?
also is there away to run all 4 commands(for db1-4) in one liner and store it as variable/array?
Thanks