Quantcast
Channel: Exchange Server 2010 forum
Viewing all articles
Browse latest Browse all 8820

Importing Delivertomailboxandforward setting from csv

$
0
0

Hi,

I have a csv file as follows,

"mailbox","Deliver","forwardto"
"test1@domain.com","True","test1@yahoo.com"
"test2@domain.com","False","test2@hotmail.com"

mailbox and forwardto addresses are already created in environment.

I need to set test1@domain.com mailboxes "DeliverToMAilboxAndForward" setting from CSV

When I try do do it with import-csv | foreach {set-mailbox ....I get the error below,

Cannot process argument transformation on parameter 'DeliverToMailboxAndForward'. Cannot convert value "System.String"
to type "System.Boolean", parameters of this type only accept booleans or numbers, use $true, $false, 1 or 0 instead.
    + CategoryInfo          : InvalidData: (:) [Set-Mailbox], ParameterBindin...mationException
    + FullyQualifiedErrorId : ParameterArgumentTransformationError,Set-Mailbox

How can I convert TRUE and FALSE strings to System.Boolean in my script?



Viewing all articles
Browse latest Browse all 8820

Trending Articles



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