Exchange set command in 2010

rated by 0 users
This post has 1 Reply | 1 Follower

Not Ranked
Posts 2
kamalasekar.p Posted: 03-15-2012 3:53 AM

Hi Team,

 

Please let me know how to run this command. i have a csv file and it contains the list mailbox names and the setting to apply true or false. I need to apply ScheduleOnlyDuringWorkHours for some users true and false. I want it should take from my csv file and need to apply the settings

 

Please let me know how to proceed with this.

$ColItems = import-csv C:\Users\Testcr.csv
foreach($colitem in $colitems)
{
  $Name= $colItem.Name
  $schonly=$colitem.schonly.

ToString()
 
Set-calendarProcessing -identity $Name -ScheduleOnlyDuringWorkHours $schonly
}

Not Ranked
Posts 2

Also please find the below error message. kindly help me

 

[PS] C:\Users>.\Testshell.ps1
Cannot process argument transformation on parameter 'ScheduleOnlyDuringWorkHou

rs'. 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-CalendarProcessing], ParameterBindin...mationException
    + FullyQualifiedErrorId : ParameterArgumentTransformationError,Set-CalendarProcessing

Page 1 of 1 (2 items) | RSS
Copyright 2012 PowerShell.com. All rights reserved.