Exchange Bulk import from .csv file to remove from Allow and then Allow - TechRepublic
Question
April 15, 2021 at 10:17 PM
t0kyobanana

Exchange Bulk import from .csv file to remove from Allow and then Allow

by t0kyobanana . Updated 5 years, 1 month ago

Hello Genius Peeps,

Thought maybe I could turn here for some help! Does anyone know of a Powershell script I could run on our Exchange server for to the following:

1) We would initially want to clear all or current mobile devices from all the users

2) Then re-add their specific mobile device ID that we received from them to the ALLOW list

Is there some sort of .csv and script I can create to make this process fast?

We found the following scripts to remove all from ALLOW and to add to ALLOW

Clear all Allow
Set-CASMailbox -Identity username -ActiveSyncAllowedDeviceIDs $null

Add to Allow
Set-CASMailbox -Identity username -ActiveSyncAllowedDeviceIDs @{add=’DeviceId’}

And maybe after running this script if theres also a quick way to show the results were made to the accounts? Using this command? Get-CASMailbox -Identity username | fl activesync*

This discussion is locked

All Comments