1

Well, I can safely say I'm stuck here. Checking similar issues, rearranging code, adding/removing headers. Everything short of tossing the server in a river, but for some reason it refuses to accept any values. The gist of the issue is that I'm trying to export a series of mailboxes to individual .pst's in a local folder. While I've managed to iron out all the code leading up to this point, the last error just doesn't want to cooperate. This is being done through EMS for Exchange 2010, on Windows Server 2011.

$mailboxez = Import-Csv "[File path]\[emailfile].csv" -Header 'Header1'
   ForEach ($Header1 in $mailboxez) {%{$_|Get-mailbox -Identity $Header1|New-MailboxExportRequest -FilePath "[archive file path]\$($_.alias).pst"
   }
}

Any time I've tried to pipe the values from my .csv file into the next command, it responds with "Cannot process argument transformation on parameter 'Identity'. Cannot convert the "@{Header1=user@contoso.com}" value of type "Deserialized.System.Management.Automation.PSCustomObject" to type "Microsoft.Exchange.Configuration.Tasks.MailboxIdParameter"."

I know a similar issue has been covered here before, but the fixes there don't seem to work on my end. I have a feeling I'm missing something obvious, but I'd rather take the shame of asking a stupid question over another minute of this issue. If there's anyone who can help out with this, I'd be extremely grateful.

Happy trails y'all

Spicehead
  • 11
  • 1

0 Answers0