Link to home
Start Free TrialLog in
Avatar of sirichaiphumirat
sirichaiphumiratFlag for United States of America

asked on

exchange activesync powershell

Need some help in creating a script to set activesync devices to allow for a list of users.

What i have so far

//puts name and deviceID in to mylist variable
$mylist = Get-Mailbox -server ExServer01 | ForEach-Object {
      $Name = $_.Name
      Get-MobileDevice -Mailbox $_.Name | Select-Object -Property @{Name='Name'; Expression={$Name}}, DeviceID}

How would i use $mylist to loop through and set each users devices to allow. Below is how i would do one person.

Set-CASMailbox -Identity: "tonysmith" -ActiveSyncAllowedDeviceIDs: "<DeviceID_1>"

if there is a better way that would be great also

thank for any help
ASKER CERTIFIED SOLUTION
Avatar of Amit Kumar
Amit Kumar
Flag of India image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial