Quantcast
Channel: Windows PowerShell forum
Viewing all articles
Browse latest Browse all 21975

Get-Recipient or Get-Mailbox and "white spaces" after import user to TXT files.

$
0
0

Hi Guys,

In this week I had small task to move mailboxes from old SBS to new Exchange user. I have done this task with small problems. I decided of course to use Powershell to make my life simple.

Step 1.

Get-Recipient | Select-Object name, Database | where database -Match "Mailbox Database" |  FT - Property name | Out-File -FilePath c:\ex_users.txt

or

Get-Mailbox  | select name, servername | where ServerName -match Server1 | select Name | Out-File -FilePath c:\ex_users.txt -Encoding UTF8

Unfortunately I had to spent some time to clean output files. After export files I noticed that something is wrong with text format.

How can I avoid "white spaces" ?                                                                                                      


Viewing all articles
Browse latest Browse all 21975

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>