asked on
$User = Read-Host -Prompt "Who's Mobile Devices are you going to nuke? Enter username"
$Devices = Get-MobileDevice -Mailbox $user
ForEach ($Device in $Devices)
{
Remove-MobileDevice $Device
}
Clear-Variable User,Name,Devices
But I keep getting this: Cannot process argument transformation on parameter 'Identity'. Cannot convert the "Persons Name\ExchangeActiveSyncDevices\iPad§Q5F3123456KHLAGK41P7VO" value of type
"Deserialized.Microsoft.Exchange.Data.Directory.SystemConfiguration.MobileDevice" to type "Microsoft.Exchange.Configuration.Tasks.MobileDeviceIdParameter".
+ CategoryInfo : InvalidData: (:) [Remove-MobileDevice], ParameterBindin...mationException
+ FullyQualifiedErrorId : ParameterArgumentTransformationError,Remove-MobileDevice
+ PSComputerName : outlook.office365.com
Set-CASMailbox username -ActiveSyncDeviceIDs $null
as a finisher.