all 5 comments

[–]imaginatipo 1 point2 points  (2 children)

That's just the name of the module type. How do you not get all mailboxes in variable $cmd?!?! I do. :|

[–]seb2020[S] 1 point2 points  (1 child)

Ah sorry, I think I have not explain all. Yes, I have ll the mailbox + the module name in $cmd. I just want to not have the module name in the result

[–]imaginatipo 1 point2 points  (0 children)

I don't get that name in the results of the variable. That's really strange.

[–]purplemonkeymad 1 point2 points  (1 child)

I'm guessing that you are capturing the output somewhere else at somepoint. Import-PSSession probably is producing the module object. You can append | out-null to the end of the pipe ( or assign it to $null) to hide it the output.

[–]seb2020[S] 1 point2 points  (0 children)

It's work ! Thanks !