The below script isnot adding the active sync ids. what I am doing wrong. see down
CSV file andResult
$CSV|ForEach{ $arr=$_.SerialNumber $result=$arr.split(",") $TotalUsers=$result.GetUpperBound(0)+1for($i=0; $i -lt $TotalUsers; $i++){set-CasMailbox $_.Name-ActiveSyncAllowedDeviceIDs:{$result[$i]}}}
I've a CSV file bel
Name,SerialNumber
TUTTLSX,"ApplF17LQKC0FF9R,ApplDMPHVU4EDVGH"
Result
PS C:\temp\dell> Get-CasMailbox tuttlsx | fl name, active*
Name : TUTTLSX
ActiveSyncAllowedDeviceIDs : {`$result[$i]}
ActiveSyncBlockedDeviceIDs : {$null}
ActiveSyncMailboxPolicy : Default
ActiveSyncMailboxPolicyIsDefaulted : True
ActiveSyncDebugLogging :
ActiveSyncEnabled : True