我需要这个脚本的帮助。
$data = Import-CSV C:\temp\import.csv
ForEach ($i in $data){
$pstpath = "\\server\pst$\" + $i.folder + "\"
$user = $i.user
$folder = $i.folder
Get-ChildItem -Recurse -path $pstpath -Filter *.pst | New-MailboxImportRequest -FilePath "$pstpath + $_.name" - Mailbox $user -Name "Import $user $_.name" -BadItemLimit 30 -ConflictResolutionOption KeepAll -TargetRootFolder $_.name -IsArchive -confirm: $false
}
我对文件夹中的每个 pst 都有此错误:
输入对象不能绑定到命令的任何参数,因为命令不接受管道输入,或者输入及其属性不匹配接受管道输入的任何参数。+ CategoryInfo : InvalidArgument: (archive.pst:PSObject) [New-MailboxImportRequest], ParameterBindingException
+ FullyQualifiedErrorId : InputObjectNotBound,New-MailboxImportRequest