<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	
	>
<channel>
	<title>
	Comments on: Get Mobile Device Statistics In Exchange Online Using Powershell	</title>
	<atom:link href="https://thesysadminchannel.com/get-mobile-device-statistics-in-exchange-online-using-powershell/feed/" rel="self" type="application/rss+xml" />
	<link>https://thesysadminchannel.com/get-mobile-device-statistics-in-exchange-online-using-powershell/</link>
	<description>Documenting My Life as a System Administrator</description>
	<lastBuildDate>Fri, 24 Feb 2023 19:46:34 +0000</lastBuildDate>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=6.8.2</generator>
	<item>
		<title>
		By: David		</title>
		<link>https://thesysadminchannel.com/get-mobile-device-statistics-in-exchange-online-using-powershell/#comment-8574</link>

		<dc:creator><![CDATA[David]]></dc:creator>
		<pubDate>Fri, 24 Feb 2023 19:46:34 +0000</pubDate>
		<guid isPermaLink="false">https://thesysadminchannel.com/?p=2455#comment-8574</guid>

					<description><![CDATA[I have the same question as Steven.  How do you do this for all &quot;user&quot; mailboxes in EXO?  Also, the Get-MobileDeviceStatistics command should be Get-EXOMobileDeviceStatistics according to Microsoft.  I have a script to loop through devices and get the information I want so that I can verify it before deleting old devices, but I keep getting errors on some stating is matches multiple entries.  I don&#039;t trust the data it gives me if the script has errors.  Any ideas?  
Import-Module ExchangeOnlineManagement
$Admin = Read-Host &quot;Please enter your administrative user account email&quot;

Connect-ExchangeOnline -UserPrincipalName $Admin

$DevToRm = Get-MobileDevice -ResultSize Unlimited &#124; Get-EXOMobileDeviceStatistics &#124; Select-Object DeviceID, Identity, LastSuccessSync, Guid &#124; where {$_.LastSuccessSync -le (Get-Date).AddDays(&quot;-30&quot;)}
$DevToRm &#124; Export-Csv &quot;c:\Temp\Mobile_DevicestoRemove.csv&quot;

Disconnect-ExchangeOnline 
Get-EXOMobileDeviceStatistics : An error occurred while processing this request.. {&quot;error&quot;:{&quot;code&quot;:&quot;InternalServerError&quot;,&quot;message&quot;:&quot;Error executing
request. The operation couldn&#039;t be performed because &#039;UserNameHidden\\ExchangeActiveSyncDevices\\Hx\u00a7Outlook\u00a74D3328FAD5BF3716A733E6F747C9CC76&#039;
matches multiple
entries.&quot;,&quot;details&quot;:[{&quot;code&quot;:&quot;Context&quot;,&quot;target&quot;:&quot;&quot;,&quot;message&quot;:&quot;Ex9E65A2&#124;Microsoft.Exchange.Configuration.Tasks.ManagementObjectAmbiguousException&#124;The
operation couldn&#039;t be performed because &#039;User.Name\\ExchangeActiveSyncDevices\\Hx\u00a7Outlook\u00a74D3328FAD5BF3716A733E6F747C9CC76&#039; matches
multiple entries.&quot;}],&quot;innererror&quot;:{&quot;message&quot;:&quot;Error executing request. The operation couldn&#039;t be performed because &#039;User.Name\\ExchangeActiveSyncDevices\\Hx\u00a7Outlook\u00a74D3328FAD5BF3716A733E6F747C9CC76&#039; matches multiple
entries.&quot;,&quot;type&quot;:&quot;Microsoft.Exchange.Admin.OData.Core.ODataServiceException&quot;,&quot;stacktrace&quot;:&quot; at
Microsoft.Exchange.AdminApi.PSDirectInvokeProvider.AdminDirectInvokeProviderBase`3.Handl ...
At line:6 char:53
+ ... eDevice -ResultSize Unlimited &#124; Get-EXOMobileDeviceStatistics &#124; Selec ...
+                                   ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo         : ProtocolError: (:) [Get-EXOMobileDeviceStatistics], Exception
    + FullyQualifiedErrorId : One or more errors occurred.,Microsoft.Exchange.Management.RestApiClient.GetExoMobileDeviceStatistics]]></description>
			<content:encoded><![CDATA[<p>I have the same question as Steven.  How do you do this for all &#8220;user&#8221; mailboxes in EXO?  Also, the Get-MobileDeviceStatistics command should be Get-EXOMobileDeviceStatistics according to Microsoft.  I have a script to loop through devices and get the information I want so that I can verify it before deleting old devices, but I keep getting errors on some stating is matches multiple entries.  I don&#8217;t trust the data it gives me if the script has errors.  Any ideas?<br />
Import-Module ExchangeOnlineManagement<br />
$Admin = Read-Host &#8220;Please enter your administrative user account email&#8221;</p>
<p>Connect-ExchangeOnline -UserPrincipalName $Admin</p>
<p>$DevToRm = Get-MobileDevice -ResultSize Unlimited | Get-EXOMobileDeviceStatistics | Select-Object DeviceID, Identity, LastSuccessSync, Guid | where {$_.LastSuccessSync -le (Get-Date).AddDays(&#8220;-30&#8221;)}<br />
$DevToRm | Export-Csv &#8220;c:\Temp\Mobile_DevicestoRemove.csv&#8221;</p>
<p>Disconnect-ExchangeOnline<br />
Get-EXOMobileDeviceStatistics : An error occurred while processing this request.. {&#8220;error&#8221;:{&#8220;code&#8221;:&#8221;InternalServerError&#8221;,&#8221;message&#8221;:&#8221;Error executing<br />
request. The operation couldn&#8217;t be performed because &#8216;UserNameHidden\\ExchangeActiveSyncDevices\\Hx\u00a7Outlook\u00a74D3328FAD5BF3716A733E6F747C9CC76&#8217;<br />
matches multiple<br />
entries.&#8221;,&#8221;details&#8221;:[{&#8220;code&#8221;:&#8221;Context&#8221;,&#8221;target&#8221;:&#8221;&#8221;,&#8221;message&#8221;:&#8221;Ex9E65A2|Microsoft.Exchange.Configuration.Tasks.ManagementObjectAmbiguousException|The<br />
operation couldn&#8217;t be performed because &#8216;User.Name\\ExchangeActiveSyncDevices\\Hx\u00a7Outlook\u00a74D3328FAD5BF3716A733E6F747C9CC76&#8217; matches<br />
multiple entries.&#8221;}],&#8221;innererror&#8221;:{&#8220;message&#8221;:&#8221;Error executing request. The operation couldn&#8217;t be performed because &#8216;User.Name\\ExchangeActiveSyncDevices\\Hx\u00a7Outlook\u00a74D3328FAD5BF3716A733E6F747C9CC76&#8217; matches multiple<br />
entries.&#8221;,&#8221;type&#8221;:&#8221;Microsoft.Exchange.Admin.OData.Core.ODataServiceException&#8221;,&#8221;stacktrace&#8221;:&#8221; at<br />
Microsoft.Exchange.AdminApi.PSDirectInvokeProvider.AdminDirectInvokeProviderBase`3.Handl &#8230;<br />
At line:6 char:53<br />
+ &#8230; eDevice -ResultSize Unlimited | Get-EXOMobileDeviceStatistics | Selec &#8230;<br />
+                                   ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~<br />
    + CategoryInfo         : ProtocolError: (:) [Get-EXOMobileDeviceStatistics], Exception<br />
    + FullyQualifiedErrorId : One or more errors occurred.,Microsoft.Exchange.Management.RestApiClient.GetExoMobileDeviceStatistics</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: Steven		</title>
		<link>https://thesysadminchannel.com/get-mobile-device-statistics-in-exchange-online-using-powershell/#comment-8545</link>

		<dc:creator><![CDATA[Steven]]></dc:creator>
		<pubDate>Thu, 23 Feb 2023 16:27:13 +0000</pubDate>
		<guid isPermaLink="false">https://thesysadminchannel.com/?p=2455#comment-8545</guid>

					<description><![CDATA[Thanks for this, how do i do this for all devices in exchange online?]]></description>
			<content:encoded><![CDATA[<p>Thanks for this, how do i do this for all devices in exchange online?</p>
]]></content:encoded>
		
			</item>
	</channel>
</rss>
