Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

List of all mobile devices

Status
Not open for further replies.

intel233

MIS
Feb 24, 2007
289
US
I need to get a list of all users who have mobile devices. I tried using:

set-adserversettings -viewentireforest $true
Get-ActiveSyncDevice | select identity, devicetype, deviceos >c:\temp\mobile.csv

but it comes out where you cant read the identity. It is not coming out correctly. Does anyone have a good script to do this?
 
Define "correctly" :)

Try
$ActiveSyncDevices = @()

ForEach ($Mailbox in Get-Mailbox –Server MBX01) {
Get-ActiveSyncDeviceStatistics -Mailbox $Mailbox.Identity –ErrorAction SilentlyContinue | Select DeviceFriendlyName, Devicetype, DeviceUserAgent | ForEach-Object { $_ | Add-Member –MemberType NoteProperty -Name "MailboxIdentity" -value $Mailbox
$ActiveSyncDevices += $_ }
}

$ActiveSyncDevices | Export-csv c:\Path\To\File.csv
 
The username does not show. Identity field is unreadable, its too long and you cant see the actual user.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top