Quantcast
Channel: Exchange Server 2013 - General Discussion forum
Viewing all articles
Browse latest Browse all 4521

Batch new-mailbox script issue

$
0
0

Hi there. Could you please help me with an issue I am having, I have used this batch mailbox script many times before but it has suddenly decided to stop working it appears to run but does not create any mailboxes and does not give any error messages at all. Am I missing something blindingly obvious?

$c = Get-Credential

Import-CSV Test.csv | foreach {New-Mailbox -SamAccountName $_.samaccountname -Name $_.name -UserPrincipalName $_.UPN -Database “Tenant” -OrganizationalUnit 'domain.com.au/Tenant' -AddressBookPolicy 'Tenant' -Password $c.password -ResetPasswordOnNextLogon $false}

I tried a similar script from technet which is pretty much the same as mine

$c = Get-Credential

$users = Import-CSV "C:\Test.csv" 

$users| foreach

{

New-Mailbox -SamAccountName $_.samaccountname -Name $_.name -UserPrincipalName $_.UPN -Database “Tenant” -OrganizationalUnit 'domain.com.au/BC ESP/TEST' -AddressBookPolicy 'Tenant' -Password $c.password -ResetPasswordOnNextLogon $false

}

Although when I run this one I get the following message

Process[0]:

Any help would be hugely appreciated.

Thanks


Viewing all articles
Browse latest Browse all 4521

Trending Articles



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