title: Test if mailbox is in use, if it does add a variable to the SMTP name
body: <p>Looking to test a new script, pretty much if a users mailbox exist change the SMTP name to include a variable at the end example <code>John.Doe@mycompany.com</code> would be changed to <code>John.Doe1@mycompany.com</code>. I'm able to test if the mailbox exist with the <code>Get-Mailbox</code> or <code>Get-Recipient</code> commands but I need a way to output the result and store it in a variable?</p>
  
  <p>Example:</p>
  
  <pre><code>if (!(Get-Mailbox 'John.Doe@mycompany.com'))-eq $true {
    Mailbox = 'John.Doe1@mycompany.com
  } else {
    Write-Host "Mailbox is available
  }
  </code></pre>
  
  <p>Or something along these lines, I don't have any code written yet to upload.</p>