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
- Edited by itsgold 9 hours 3 minutes ago