Hey Team,
So i am trying to schedule and run a backup script for Exchange 2013. Here is the command and error i am using:
powershell.exe -psconsolefile "C:\Program Files\Microsoft\Exchange Server\V15\Bin\exshell.psc1" -file ""C:\Temp\Scripts\.\Exchange_EER_ShowingIncremental.ps1 -HTMLReport c:\temp\scripts\report.html -SendMail:$true -MailFrom:robert.bollinger@domain.com -MailTo:BackupNotifications@domain.com -MailServer:localhost""This is the error i get when trying to run if from a command line:
C:\Temp\Scripts\Exchange_EER_ShowingIncremental.ps1 : Cannot process argument
transformation on parameter 'SendMail'. Cannot convert value "System.String"
to type "System.Boolean". Boolean parameters accept only Boolean values and
numbers, such as $True, $False, 1 or 0.
+ CategoryInfo : InvalidData: (:) [Exchange_EER_ShowingIncrementa
l.ps1], ParentContainsErrorRecordException
+ FullyQualifiedErrorId : ParameterArgumentTransformationError,Exchange_EE
R_ShowingIncremental.ps1
I have been racking my brain on this one, but i am stuck. If i dont use 2 quotes "" for both opening and closing the command i get different errors.
This is such a simple thing - its driving me nuts!!
Thanks,
Robert
Robert