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

Script will not work

$
0
0

Hello,

I am running this following script:-

# Bulk Mailbox Export for users selected from CSV File

 
# Script Starts here
$Users = Import-Csv c:\users.csv
 
foreach ($Users in Import-Csv ./users.csv)
{ New-MailboxExportRequest -Mailbox $Users.Alias -Filepath"\\Server\c$\exportpst\$($Users.Alias).pst }
{
}

I keep getting the same error:- Cannot validate argument on parameter 'Mailbox'. The argument is null. Supply a non-null argument and try the command a
gain.
    + CategoryInfo          : InvalidData: (:) [New-MailboxExportRequest], ParameterBindingValidationException
    + FullyQualifiedErrorId : ParameterArgumentValidationError,New-MailboxExportRequest

Please can you help?

Kind Regards,

PenDraKon



Viewing all articles
Browse latest Browse all 21975

Trending Articles



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