Hi @Nitech Inc ,
Have you ever tried this:
Get-CASMailbox | Set-CASMailbox -ActiveSyncAllowedDeviceIDs $null
Import-Csv C:\list.csv |
ForEach{
try {
Set-CASMailbox -Identity $_.UserName -ActiveSyncAllowedDeviceIDs $_.DeviceId -ErrorAction Stop
Write-Output "Successfully Done $_" | Out-File "C:\added.csv" -Append
}
catch [System.Exception]
{
Write-Output "$_" | Out-File "c:\error.csv" -Append
}
Finally
{
}}
Since your issue is same with this thread: https://learn.microsoft.com/en-us/answers/questions/359416/exchange-bulk-import-from-csv-file-to-remove-from.html
I think you could check it and if that doesn't meet your requirement, please let me know.
Best regards,
Lou
If the response is helpful, please click "Accept Answer" and upvote it.
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.