Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8510141
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T03:37:26+00:00 2026-06-11T03:37:26+00:00

I need a help with this script. $data = Import-CSV C:\temp\import.csv ForEach ($i in

  • 0

I need a help with this script.

$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

}

I’ve got this error for each pst in folder:

The input object cannot be bound to any parameters for the command either because the command does not take pipeline in
put or the input and its properties do not match any of the parameters that take pipeline input.
+ CategoryInfo : InvalidArgument: (archive.pst:PSObject) [New-MailboxImportRequest], ParameterBindingException
+ FullyQualifiedErrorId : InputObjectNotBound,New-MailboxImportRequest

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-11T03:37:28+00:00Added an answer on June 11, 2026 at 3:37 am

    Looks like the New-MailboxImportRequest cmdlet doesn’t accept pipeline input, and if it did you’s have to remove the ‘-FilePath “$pstpath + $_.name”‘ part from the command.

    Try this instead:

    $data = Import-CSV C:\temp\import.csv
    ForEach ($i in $data){
    
        $user = $i.user
        $folder = $i.folder
        $pstpath = "\\server\pst$\$folder"
    
        Get-ChildItem -Recurse -path $pstpath -Filter *.pst | Foreach-Object{
            New-MailboxImportRequest -FilePath $_.FullName - Mailbox $user -Name "Import $user $($_.Name)" -BadItemLimit 30 -ConflictResolutionOption KeepAll -TargetRootFolder $_.Name -IsArchive -Confirm:$false
        }
    
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Need help writing a script downloads data from google insight using c# this is
I need a little help getting this script doing what I want it to.
I need help getting VIM to correctly indent javascript inside script tags. This is
Need your help, trying to change this script: https://github.com/MrHus/jquery-monthly-ical To load external JSON data
I need help writing a TSQL script to modify two columns' data type. We
I am using this script to display MYSQL data, but I need to make
I need some help with escaping the quotes in this script, I have code
I really need help this time - Joomla 2.5 and latest K2. I'm using
i need help with this. I'am using JQuery's Dynamic Form plug-in, it duplicates my
I need help finishing this statement. It is frustrating that two of the PHP

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.