Quantcast
Viewing all articles
Browse latest Browse all 19214

Import-CSV piped to Get-Recipient

Having some difficulty with the following, I can think of multiple ways around the problem but I'd like to figure out how to do it "correctly". :)

CSV File:

Name,EmailAddress
User1,user1@company.com
User2,user2@company.com

Import-CSV file.csv | select-object EmailAddress | get-recipient

The input object cannot be bound to any parameters for the command either because the command does not take pipeline input or the input and its properties do not match any of the parameters that take pipeline input.
    + CategoryInfo          : InvalidArgument: (@{EmailAddress=...company.com}:PSObject) [Get-Recipient], Parameter
   BindingException
    + FullyQualifiedErrorId : InputObjectNotBound,Get-Recipient

Seems like a object type issue I'm assuming?  Need to convert it to (or from) a string?  Thanks


Viewing all articles
Browse latest Browse all 19214

Trending Articles