sirichaiphumirat
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" -ActiveSyncAllowedDeviceID s: "<DeviceID_1>"
if there is a better way that would be great also
thank for any help
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" -ActiveSyncAllowedDeviceID
if there is a better way that would be great also
thank for any help
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.