Quantcast
Channel: Windows PowerShell forum
Viewing all articles
Browse latest Browse all 21975

Not able to add active sync ids

$
0
0

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


Viewing all articles
Browse latest Browse all 21975

Trending Articles



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