Powershell Exchange Delete old Phone Sync DevicesExporting specific fields with powershell's export-csvPowershell: Wanting Exchange statistics and running into (output) limitationsPowershell script to delete secondary SMTP addresses of Exchange 2010 Mail Contacts(Powershell) Method to return a list of groups where a specific user has 'write member' securityPowershell pipe exporting to csv is loosing dataPowershell Script to output all Distribution groups and nested groups into a csvHow to receive email notification of non-AD joined DHCP leases?Powrshell Script to read the Windows Secutiry logs and filter Elevation type 196 and 1937Powershell List Users who have RDS User CalError while running powershell script to back up DNS Zones

Can a human be transformed into a Mind Flayer?

How can I deal with uncomfortable silence from my partner?

What is the purpose of bonds within an investment portfolio?

Proving that a Russian cryptographic standard is too structured

Understanding "Current Draw" in terms of "Ohm's Law"

Why did Intel abandon unified CPU cache?

With Ubuntu 18.04, how can I have a hot corner that locks the computer?

color rows on table (Tabu package)

Generate basis elements of the Steenrod algebra

Is there a set of positive integers of density 1 which contains no infinite arithmetic progression?

Russian word for a male zebra

The Frozen Wastes

Excel division by 0 error when trying to average results of formulas

What is this airplane?

Why was this person allowed to become Grand Maester?

Advantages of the Exponential Family: why should we study it and use it?

Is this a bug in plotting step functions?

How to “listen” to existing circuit

Why Does Mama Coco Look Old After Going to the Other World?

How do free-speech protections in the United States apply in public to corporate misrepresentations?

I have a problematic assistant manager, but I can't fire him

Teaching a class likely meant to inflate the GPA of student athletes

Is it possible to have a wealthy country without a middle class?

Return a String containing only alphabets without spaces



Powershell Exchange Delete old Phone Sync Devices


Exporting specific fields with powershell's export-csvPowershell: Wanting Exchange statistics and running into (output) limitationsPowershell script to delete secondary SMTP addresses of Exchange 2010 Mail Contacts(Powershell) Method to return a list of groups where a specific user has 'write member' securityPowershell pipe exporting to csv is loosing dataPowershell Script to output all Distribution groups and nested groups into a csvHow to receive email notification of non-AD joined DHCP leases?Powrshell Script to read the Windows Secutiry logs and filter Elevation type 196 and 1937Powershell List Users who have RDS User CalError while running powershell script to back up DNS Zones






.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty height:90px;width:728px;box-sizing:border-box;








1















I'm trying to run a Powershell Script that will clean up any Phones that haven't synced in at least 110 days with the Exchange 2013 Server.



My code will pull the data and export it to CSV but when I try to pipe in the Remove-MobileDevice command to delete the devices the script fails to do so. Nothing I found on the Internet has been of much help so far. Most are using the outdated ActiveSyncDevice cmdlets.



Here's my code, I'm new to PowerShell and appreciate any help:



Get-MobileDevice -result unlimited | Get-MobileDeviceStatistics | where $_.LastSuccessSync -le (Get-Date).AddDays(“-110”) | select devicetype, deviceidentity, deviceos, deviceuseragent, identity | Export-csv C:PhoneSyncLogsStale_Devices_110days_$((Get-Date).ToString('MM-dd-yyyy_hh-mm-ss')).csv | foreach (Remove-MobileDevice -Identity DeviceUserAgent -confirm:$false)









share|improve this question













migrated from stackoverflow.com Mar 23 '17 at 14:13


This question came from our site for professional and enthusiast programmers.


















  • One issue is that you are attempting pipe to your final foreach after exporting your csv. Probably worth while to break your one-liner into an a multiple line script for clarity.

    – BenH
    Jan 18 '17 at 18:52











  • Did you inspect the CSV file?

    – Jeroen Heier
    Jan 18 '17 at 18:58











  • I tried removing the export and it still bombs out with this error: The mobile device DeviceUserAgent cannot be found. + CategoryInfo : NotSpecified: (:) [Remove-MobileDevice], ManagementObjectNotFoundException + FullyQualifiedErrorId : [Server=WEBMAIL,RequestId=771c3306-817b-4049-a076-e398d73fbaed,TimeStamp=1/18/2017 6:59:23 PM] [FailureCategory=Cmdlet -ManagementObjectNotFoundException] DFB3D711,Microsoft.Exchange.Management.Tasks.RemoveMobileDevice + PSComputerName : webmail.server.com

    – djl236
    Jan 18 '17 at 19:00











  • Yes, the CSV contains the device I want deleted.

    – djl236
    Jan 18 '17 at 19:02











  • That issue is because foreach object you are passing you are statically defining the Identity as "DeviceUserAgent" with this: -Identity DeviceUserAgent Try changing it to -Identity $_.DeviceUserAgent.

    – BenH
    Jan 18 '17 at 21:34

















1















I'm trying to run a Powershell Script that will clean up any Phones that haven't synced in at least 110 days with the Exchange 2013 Server.



My code will pull the data and export it to CSV but when I try to pipe in the Remove-MobileDevice command to delete the devices the script fails to do so. Nothing I found on the Internet has been of much help so far. Most are using the outdated ActiveSyncDevice cmdlets.



Here's my code, I'm new to PowerShell and appreciate any help:



Get-MobileDevice -result unlimited | Get-MobileDeviceStatistics | where $_.LastSuccessSync -le (Get-Date).AddDays(“-110”) | select devicetype, deviceidentity, deviceos, deviceuseragent, identity | Export-csv C:PhoneSyncLogsStale_Devices_110days_$((Get-Date).ToString('MM-dd-yyyy_hh-mm-ss')).csv | foreach (Remove-MobileDevice -Identity DeviceUserAgent -confirm:$false)









share|improve this question













migrated from stackoverflow.com Mar 23 '17 at 14:13


This question came from our site for professional and enthusiast programmers.


















  • One issue is that you are attempting pipe to your final foreach after exporting your csv. Probably worth while to break your one-liner into an a multiple line script for clarity.

    – BenH
    Jan 18 '17 at 18:52











  • Did you inspect the CSV file?

    – Jeroen Heier
    Jan 18 '17 at 18:58











  • I tried removing the export and it still bombs out with this error: The mobile device DeviceUserAgent cannot be found. + CategoryInfo : NotSpecified: (:) [Remove-MobileDevice], ManagementObjectNotFoundException + FullyQualifiedErrorId : [Server=WEBMAIL,RequestId=771c3306-817b-4049-a076-e398d73fbaed,TimeStamp=1/18/2017 6:59:23 PM] [FailureCategory=Cmdlet -ManagementObjectNotFoundException] DFB3D711,Microsoft.Exchange.Management.Tasks.RemoveMobileDevice + PSComputerName : webmail.server.com

    – djl236
    Jan 18 '17 at 19:00











  • Yes, the CSV contains the device I want deleted.

    – djl236
    Jan 18 '17 at 19:02











  • That issue is because foreach object you are passing you are statically defining the Identity as "DeviceUserAgent" with this: -Identity DeviceUserAgent Try changing it to -Identity $_.DeviceUserAgent.

    – BenH
    Jan 18 '17 at 21:34













1












1








1








I'm trying to run a Powershell Script that will clean up any Phones that haven't synced in at least 110 days with the Exchange 2013 Server.



My code will pull the data and export it to CSV but when I try to pipe in the Remove-MobileDevice command to delete the devices the script fails to do so. Nothing I found on the Internet has been of much help so far. Most are using the outdated ActiveSyncDevice cmdlets.



Here's my code, I'm new to PowerShell and appreciate any help:



Get-MobileDevice -result unlimited | Get-MobileDeviceStatistics | where $_.LastSuccessSync -le (Get-Date).AddDays(“-110”) | select devicetype, deviceidentity, deviceos, deviceuseragent, identity | Export-csv C:PhoneSyncLogsStale_Devices_110days_$((Get-Date).ToString('MM-dd-yyyy_hh-mm-ss')).csv | foreach (Remove-MobileDevice -Identity DeviceUserAgent -confirm:$false)









share|improve this question














I'm trying to run a Powershell Script that will clean up any Phones that haven't synced in at least 110 days with the Exchange 2013 Server.



My code will pull the data and export it to CSV but when I try to pipe in the Remove-MobileDevice command to delete the devices the script fails to do so. Nothing I found on the Internet has been of much help so far. Most are using the outdated ActiveSyncDevice cmdlets.



Here's my code, I'm new to PowerShell and appreciate any help:



Get-MobileDevice -result unlimited | Get-MobileDeviceStatistics | where $_.LastSuccessSync -le (Get-Date).AddDays(“-110”) | select devicetype, deviceidentity, deviceos, deviceuseragent, identity | Export-csv C:PhoneSyncLogsStale_Devices_110days_$((Get-Date).ToString('MM-dd-yyyy_hh-mm-ss')).csv | foreach (Remove-MobileDevice -Identity DeviceUserAgent -confirm:$false)






powershell






share|improve this question













share|improve this question











share|improve this question




share|improve this question










asked Jan 18 '17 at 18:37







djl236











migrated from stackoverflow.com Mar 23 '17 at 14:13


This question came from our site for professional and enthusiast programmers.









migrated from stackoverflow.com Mar 23 '17 at 14:13


This question came from our site for professional and enthusiast programmers.














  • One issue is that you are attempting pipe to your final foreach after exporting your csv. Probably worth while to break your one-liner into an a multiple line script for clarity.

    – BenH
    Jan 18 '17 at 18:52











  • Did you inspect the CSV file?

    – Jeroen Heier
    Jan 18 '17 at 18:58











  • I tried removing the export and it still bombs out with this error: The mobile device DeviceUserAgent cannot be found. + CategoryInfo : NotSpecified: (:) [Remove-MobileDevice], ManagementObjectNotFoundException + FullyQualifiedErrorId : [Server=WEBMAIL,RequestId=771c3306-817b-4049-a076-e398d73fbaed,TimeStamp=1/18/2017 6:59:23 PM] [FailureCategory=Cmdlet -ManagementObjectNotFoundException] DFB3D711,Microsoft.Exchange.Management.Tasks.RemoveMobileDevice + PSComputerName : webmail.server.com

    – djl236
    Jan 18 '17 at 19:00











  • Yes, the CSV contains the device I want deleted.

    – djl236
    Jan 18 '17 at 19:02











  • That issue is because foreach object you are passing you are statically defining the Identity as "DeviceUserAgent" with this: -Identity DeviceUserAgent Try changing it to -Identity $_.DeviceUserAgent.

    – BenH
    Jan 18 '17 at 21:34

















  • One issue is that you are attempting pipe to your final foreach after exporting your csv. Probably worth while to break your one-liner into an a multiple line script for clarity.

    – BenH
    Jan 18 '17 at 18:52











  • Did you inspect the CSV file?

    – Jeroen Heier
    Jan 18 '17 at 18:58











  • I tried removing the export and it still bombs out with this error: The mobile device DeviceUserAgent cannot be found. + CategoryInfo : NotSpecified: (:) [Remove-MobileDevice], ManagementObjectNotFoundException + FullyQualifiedErrorId : [Server=WEBMAIL,RequestId=771c3306-817b-4049-a076-e398d73fbaed,TimeStamp=1/18/2017 6:59:23 PM] [FailureCategory=Cmdlet -ManagementObjectNotFoundException] DFB3D711,Microsoft.Exchange.Management.Tasks.RemoveMobileDevice + PSComputerName : webmail.server.com

    – djl236
    Jan 18 '17 at 19:00











  • Yes, the CSV contains the device I want deleted.

    – djl236
    Jan 18 '17 at 19:02











  • That issue is because foreach object you are passing you are statically defining the Identity as "DeviceUserAgent" with this: -Identity DeviceUserAgent Try changing it to -Identity $_.DeviceUserAgent.

    – BenH
    Jan 18 '17 at 21:34
















One issue is that you are attempting pipe to your final foreach after exporting your csv. Probably worth while to break your one-liner into an a multiple line script for clarity.

– BenH
Jan 18 '17 at 18:52





One issue is that you are attempting pipe to your final foreach after exporting your csv. Probably worth while to break your one-liner into an a multiple line script for clarity.

– BenH
Jan 18 '17 at 18:52













Did you inspect the CSV file?

– Jeroen Heier
Jan 18 '17 at 18:58





Did you inspect the CSV file?

– Jeroen Heier
Jan 18 '17 at 18:58













I tried removing the export and it still bombs out with this error: The mobile device DeviceUserAgent cannot be found. + CategoryInfo : NotSpecified: (:) [Remove-MobileDevice], ManagementObjectNotFoundException + FullyQualifiedErrorId : [Server=WEBMAIL,RequestId=771c3306-817b-4049-a076-e398d73fbaed,TimeStamp=1/18/2017 6:59:23 PM] [FailureCategory=Cmdlet -ManagementObjectNotFoundException] DFB3D711,Microsoft.Exchange.Management.Tasks.RemoveMobileDevice + PSComputerName : webmail.server.com

– djl236
Jan 18 '17 at 19:00





I tried removing the export and it still bombs out with this error: The mobile device DeviceUserAgent cannot be found. + CategoryInfo : NotSpecified: (:) [Remove-MobileDevice], ManagementObjectNotFoundException + FullyQualifiedErrorId : [Server=WEBMAIL,RequestId=771c3306-817b-4049-a076-e398d73fbaed,TimeStamp=1/18/2017 6:59:23 PM] [FailureCategory=Cmdlet -ManagementObjectNotFoundException] DFB3D711,Microsoft.Exchange.Management.Tasks.RemoveMobileDevice + PSComputerName : webmail.server.com

– djl236
Jan 18 '17 at 19:00













Yes, the CSV contains the device I want deleted.

– djl236
Jan 18 '17 at 19:02





Yes, the CSV contains the device I want deleted.

– djl236
Jan 18 '17 at 19:02













That issue is because foreach object you are passing you are statically defining the Identity as "DeviceUserAgent" with this: -Identity DeviceUserAgent Try changing it to -Identity $_.DeviceUserAgent.

– BenH
Jan 18 '17 at 21:34





That issue is because foreach object you are passing you are statically defining the Identity as "DeviceUserAgent" with this: -Identity DeviceUserAgent Try changing it to -Identity $_.DeviceUserAgent.

– BenH
Jan 18 '17 at 21:34










1 Answer
1






active

oldest

votes


















0














Can I provide a better (automatically) solution which is build into Exchange? Since Exchange 2013/2016 Microsoft added the EasMaxInactivityForDeviceCleanup value to the throttling policy and described it here as:




The EasMaxInactivityForDeviceCleanup parameter specifies the length of
time that a user's device partnerships will remain active. By default,
there is no limit to the number of days that a user's device
partnerships will remain active. Use this value if you want to
minimize the amount of inactive device partnerships in your
organization. To use this setting, specify a value in days since the
user's last sync time to cause the device partnership to be removed.




So if I would be you, I would create a new throttling policy as explained here and assign that to your users. After that is in place and if a user is adding a new device, the Exchange server will check the configured devices and will automatically delete the unused one, during the adding from the new device. Then you do not need to run a script, the server will mostly take care of them automatically.






share|improve this answer























  • Thank you for that solution, which will be great going forward, but what about the devices there now? I'd like to get this script working to purge them. EDIT: It says this cmdlet is only available on Ex2016, we are using 2013.

    – djl236
    Jan 18 '17 at 19:56











  • I personally would wait as you said you are a new to powershell. I personally wouldn´t risk to delete any administration/monitoring devices if you haven´t the needed skills yet. The point is, how often did the user get new "toys" to play with? I would wait here. But if you really need a script you can check the one in the URL above (or here is it again).

    – BastianW
    Jan 18 '17 at 19:59











  • Its policy from management. Its currently done manually by hand by logging into each user's mailbox. I'm just trying to automate the process. The problem with the script in your URL is when I try to add exporting the results to CSV it fails.

    – djl236
    Jan 18 '17 at 20:02











  • lol someone who doesn't know scripting. I use VBScript a lot more and am just getting into PowerShell so still getting a hang for the syntax and what not. Thanks for the link.

    – djl236
    Jan 18 '17 at 20:12











Your Answer








StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "2"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);

else
createEditor();

);

function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader:
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
,
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);



);













draft saved

draft discarded


















StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fserverfault.com%2fquestions%2f840172%2fpowershell-exchange-delete-old-phone-sync-devices%23new-answer', 'question_page');

);

Post as a guest















Required, but never shown
























1 Answer
1






active

oldest

votes








1 Answer
1






active

oldest

votes









active

oldest

votes






active

oldest

votes









0














Can I provide a better (automatically) solution which is build into Exchange? Since Exchange 2013/2016 Microsoft added the EasMaxInactivityForDeviceCleanup value to the throttling policy and described it here as:




The EasMaxInactivityForDeviceCleanup parameter specifies the length of
time that a user's device partnerships will remain active. By default,
there is no limit to the number of days that a user's device
partnerships will remain active. Use this value if you want to
minimize the amount of inactive device partnerships in your
organization. To use this setting, specify a value in days since the
user's last sync time to cause the device partnership to be removed.




So if I would be you, I would create a new throttling policy as explained here and assign that to your users. After that is in place and if a user is adding a new device, the Exchange server will check the configured devices and will automatically delete the unused one, during the adding from the new device. Then you do not need to run a script, the server will mostly take care of them automatically.






share|improve this answer























  • Thank you for that solution, which will be great going forward, but what about the devices there now? I'd like to get this script working to purge them. EDIT: It says this cmdlet is only available on Ex2016, we are using 2013.

    – djl236
    Jan 18 '17 at 19:56











  • I personally would wait as you said you are a new to powershell. I personally wouldn´t risk to delete any administration/monitoring devices if you haven´t the needed skills yet. The point is, how often did the user get new "toys" to play with? I would wait here. But if you really need a script you can check the one in the URL above (or here is it again).

    – BastianW
    Jan 18 '17 at 19:59











  • Its policy from management. Its currently done manually by hand by logging into each user's mailbox. I'm just trying to automate the process. The problem with the script in your URL is when I try to add exporting the results to CSV it fails.

    – djl236
    Jan 18 '17 at 20:02











  • lol someone who doesn't know scripting. I use VBScript a lot more and am just getting into PowerShell so still getting a hang for the syntax and what not. Thanks for the link.

    – djl236
    Jan 18 '17 at 20:12















0














Can I provide a better (automatically) solution which is build into Exchange? Since Exchange 2013/2016 Microsoft added the EasMaxInactivityForDeviceCleanup value to the throttling policy and described it here as:




The EasMaxInactivityForDeviceCleanup parameter specifies the length of
time that a user's device partnerships will remain active. By default,
there is no limit to the number of days that a user's device
partnerships will remain active. Use this value if you want to
minimize the amount of inactive device partnerships in your
organization. To use this setting, specify a value in days since the
user's last sync time to cause the device partnership to be removed.




So if I would be you, I would create a new throttling policy as explained here and assign that to your users. After that is in place and if a user is adding a new device, the Exchange server will check the configured devices and will automatically delete the unused one, during the adding from the new device. Then you do not need to run a script, the server will mostly take care of them automatically.






share|improve this answer























  • Thank you for that solution, which will be great going forward, but what about the devices there now? I'd like to get this script working to purge them. EDIT: It says this cmdlet is only available on Ex2016, we are using 2013.

    – djl236
    Jan 18 '17 at 19:56











  • I personally would wait as you said you are a new to powershell. I personally wouldn´t risk to delete any administration/monitoring devices if you haven´t the needed skills yet. The point is, how often did the user get new "toys" to play with? I would wait here. But if you really need a script you can check the one in the URL above (or here is it again).

    – BastianW
    Jan 18 '17 at 19:59











  • Its policy from management. Its currently done manually by hand by logging into each user's mailbox. I'm just trying to automate the process. The problem with the script in your URL is when I try to add exporting the results to CSV it fails.

    – djl236
    Jan 18 '17 at 20:02











  • lol someone who doesn't know scripting. I use VBScript a lot more and am just getting into PowerShell so still getting a hang for the syntax and what not. Thanks for the link.

    – djl236
    Jan 18 '17 at 20:12













0












0








0







Can I provide a better (automatically) solution which is build into Exchange? Since Exchange 2013/2016 Microsoft added the EasMaxInactivityForDeviceCleanup value to the throttling policy and described it here as:




The EasMaxInactivityForDeviceCleanup parameter specifies the length of
time that a user's device partnerships will remain active. By default,
there is no limit to the number of days that a user's device
partnerships will remain active. Use this value if you want to
minimize the amount of inactive device partnerships in your
organization. To use this setting, specify a value in days since the
user's last sync time to cause the device partnership to be removed.




So if I would be you, I would create a new throttling policy as explained here and assign that to your users. After that is in place and if a user is adding a new device, the Exchange server will check the configured devices and will automatically delete the unused one, during the adding from the new device. Then you do not need to run a script, the server will mostly take care of them automatically.






share|improve this answer













Can I provide a better (automatically) solution which is build into Exchange? Since Exchange 2013/2016 Microsoft added the EasMaxInactivityForDeviceCleanup value to the throttling policy and described it here as:




The EasMaxInactivityForDeviceCleanup parameter specifies the length of
time that a user's device partnerships will remain active. By default,
there is no limit to the number of days that a user's device
partnerships will remain active. Use this value if you want to
minimize the amount of inactive device partnerships in your
organization. To use this setting, specify a value in days since the
user's last sync time to cause the device partnership to be removed.




So if I would be you, I would create a new throttling policy as explained here and assign that to your users. After that is in place and if a user is adding a new device, the Exchange server will check the configured devices and will automatically delete the unused one, during the adding from the new device. Then you do not need to run a script, the server will mostly take care of them automatically.







share|improve this answer












share|improve this answer



share|improve this answer










answered Jan 18 '17 at 19:53









BastianWBastianW

2,68341533




2,68341533












  • Thank you for that solution, which will be great going forward, but what about the devices there now? I'd like to get this script working to purge them. EDIT: It says this cmdlet is only available on Ex2016, we are using 2013.

    – djl236
    Jan 18 '17 at 19:56











  • I personally would wait as you said you are a new to powershell. I personally wouldn´t risk to delete any administration/monitoring devices if you haven´t the needed skills yet. The point is, how often did the user get new "toys" to play with? I would wait here. But if you really need a script you can check the one in the URL above (or here is it again).

    – BastianW
    Jan 18 '17 at 19:59











  • Its policy from management. Its currently done manually by hand by logging into each user's mailbox. I'm just trying to automate the process. The problem with the script in your URL is when I try to add exporting the results to CSV it fails.

    – djl236
    Jan 18 '17 at 20:02











  • lol someone who doesn't know scripting. I use VBScript a lot more and am just getting into PowerShell so still getting a hang for the syntax and what not. Thanks for the link.

    – djl236
    Jan 18 '17 at 20:12

















  • Thank you for that solution, which will be great going forward, but what about the devices there now? I'd like to get this script working to purge them. EDIT: It says this cmdlet is only available on Ex2016, we are using 2013.

    – djl236
    Jan 18 '17 at 19:56











  • I personally would wait as you said you are a new to powershell. I personally wouldn´t risk to delete any administration/monitoring devices if you haven´t the needed skills yet. The point is, how often did the user get new "toys" to play with? I would wait here. But if you really need a script you can check the one in the URL above (or here is it again).

    – BastianW
    Jan 18 '17 at 19:59











  • Its policy from management. Its currently done manually by hand by logging into each user's mailbox. I'm just trying to automate the process. The problem with the script in your URL is when I try to add exporting the results to CSV it fails.

    – djl236
    Jan 18 '17 at 20:02











  • lol someone who doesn't know scripting. I use VBScript a lot more and am just getting into PowerShell so still getting a hang for the syntax and what not. Thanks for the link.

    – djl236
    Jan 18 '17 at 20:12
















Thank you for that solution, which will be great going forward, but what about the devices there now? I'd like to get this script working to purge them. EDIT: It says this cmdlet is only available on Ex2016, we are using 2013.

– djl236
Jan 18 '17 at 19:56





Thank you for that solution, which will be great going forward, but what about the devices there now? I'd like to get this script working to purge them. EDIT: It says this cmdlet is only available on Ex2016, we are using 2013.

– djl236
Jan 18 '17 at 19:56













I personally would wait as you said you are a new to powershell. I personally wouldn´t risk to delete any administration/monitoring devices if you haven´t the needed skills yet. The point is, how often did the user get new "toys" to play with? I would wait here. But if you really need a script you can check the one in the URL above (or here is it again).

– BastianW
Jan 18 '17 at 19:59





I personally would wait as you said you are a new to powershell. I personally wouldn´t risk to delete any administration/monitoring devices if you haven´t the needed skills yet. The point is, how often did the user get new "toys" to play with? I would wait here. But if you really need a script you can check the one in the URL above (or here is it again).

– BastianW
Jan 18 '17 at 19:59













Its policy from management. Its currently done manually by hand by logging into each user's mailbox. I'm just trying to automate the process. The problem with the script in your URL is when I try to add exporting the results to CSV it fails.

– djl236
Jan 18 '17 at 20:02





Its policy from management. Its currently done manually by hand by logging into each user's mailbox. I'm just trying to automate the process. The problem with the script in your URL is when I try to add exporting the results to CSV it fails.

– djl236
Jan 18 '17 at 20:02













lol someone who doesn't know scripting. I use VBScript a lot more and am just getting into PowerShell so still getting a hang for the syntax and what not. Thanks for the link.

– djl236
Jan 18 '17 at 20:12





lol someone who doesn't know scripting. I use VBScript a lot more and am just getting into PowerShell so still getting a hang for the syntax and what not. Thanks for the link.

– djl236
Jan 18 '17 at 20:12

















draft saved

draft discarded
















































Thanks for contributing an answer to Server Fault!


  • Please be sure to answer the question. Provide details and share your research!

But avoid


  • Asking for help, clarification, or responding to other answers.

  • Making statements based on opinion; back them up with references or personal experience.

To learn more, see our tips on writing great answers.




draft saved


draft discarded














StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fserverfault.com%2fquestions%2f840172%2fpowershell-exchange-delete-old-phone-sync-devices%23new-answer', 'question_page');

);

Post as a guest















Required, but never shown





















































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown

































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown







Popular posts from this blog

Club Baloncesto Breogán Índice Historia | Pavillón | Nome | O Breogán na cultura popular | Xogadores | Adestradores | Presidentes | Palmarés | Historial | Líderes | Notas | Véxase tamén | Menú de navegacióncbbreogan.galCadroGuía oficial da ACB 2009-10, páxina 201Guía oficial ACB 1992, páxina 183. Editorial DB.É de 6.500 espectadores sentados axeitándose á última normativa"Estudiantes Junior, entre as mellores canteiras"o orixinalHemeroteca El Mundo Deportivo, 16 setembro de 1970, páxina 12Historia do BreogánAlfredo Pérez, o último canoneiroHistoria C.B. BreogánHemeroteca de El Mundo DeportivoJimmy Wright, norteamericano do Breogán deixará Lugo por ameazas de morteResultados de Breogán en 1986-87Resultados de Breogán en 1990-91Ficha de Velimir Perasović en acb.comResultados de Breogán en 1994-95Breogán arrasa al Barça. "El Mundo Deportivo", 27 de setembro de 1999, páxina 58CB Breogán - FC BarcelonaA FEB invita a participar nunha nova Liga EuropeaCharlie Bell na prensa estatalMáximos anotadores 2005Tempada 2005-06 : Tódolos Xogadores da Xornada""Non quero pensar nunha man negra, mais pregúntome que está a pasar""o orixinalRaúl López, orgulloso dos xogadores, presume da boa saúde económica do BreogánJulio González confirma que cesa como presidente del BreogánHomenaxe a Lisardo GómezA tempada do rexurdimento celesteEntrevista a Lisardo GómezEl COB dinamita el Pazo para forzar el quinto (69-73)Cafés Candelas, patrocinador del CB Breogán"Suso Lázare, novo presidente do Breogán"o orixinalCafés Candelas Breogán firma el mayor triunfo de la historiaEl Breogán realizará 17 homenajes por su cincuenta aniversario"O Breogán honra ao seu fundador e primeiro presidente"o orixinalMiguel Giao recibiu a homenaxe do PazoHomenaxe aos primeiros gladiadores celestesO home que nos amosa como ver o Breo co corazónTita Franco será homenaxeada polos #50anosdeBreoJulio Vila recibirá unha homenaxe in memoriam polos #50anosdeBreo"O Breogán homenaxeará aos seus aboados máis veteráns"Pechada ovación a «Capi» Sanmartín e Ricardo «Corazón de González»Homenaxe por décadas de informaciónPaco García volve ao Pazo con motivo do 50 aniversario"Resultados y clasificaciones""O Cafés Candelas Breogán, campión da Copa Princesa""O Cafés Candelas Breogán, equipo ACB"C.B. Breogán"Proxecto social"o orixinal"Centros asociados"o orixinalFicha en imdb.comMario Camus trata la recuperación del amor en 'La vieja música', su última película"Páxina web oficial""Club Baloncesto Breogán""C. B. Breogán S.A.D."eehttp://www.fegaba.com

Vilaño, A Laracha Índice Patrimonio | Lugares e parroquias | Véxase tamén | Menú de navegación43°14′52″N 8°36′03″O / 43.24775, -8.60070

Cegueira Índice Epidemioloxía | Deficiencia visual | Tipos de cegueira | Principais causas de cegueira | Tratamento | Técnicas de adaptación e axudas | Vida dos cegos | Primeiros auxilios | Crenzas respecto das persoas cegas | Crenzas das persoas cegas | O neno deficiente visual | Aspectos psicolóxicos da cegueira | Notas | Véxase tamén | Menú de navegación54.054.154.436928256blindnessDicionario da Real Academia GalegaPortal das Palabras"International Standards: Visual Standards — Aspects and Ranges of Vision Loss with Emphasis on Population Surveys.""Visual impairment and blindness""Presentan un plan para previr a cegueira"o orixinalACCDV Associació Catalana de Cecs i Disminuïts Visuals - PMFTrachoma"Effect of gene therapy on visual function in Leber's congenital amaurosis"1844137110.1056/NEJMoa0802268Cans guía - os mellores amigos dos cegosArquivadoEscola de cans guía para cegos en Mortágua, PortugalArquivado"Tecnología para ciegos y deficientes visuales. Recopilación de recursos gratuitos en la Red""Colorino""‘COL.diesis’, escuchar los sonidos del color""COL.diesis: Transforming Colour into Melody and Implementing the Result in a Colour Sensor Device"o orixinal"Sistema de desarrollo de sinestesia color-sonido para invidentes utilizando un protocolo de audio""Enseñanza táctil - geometría y color. Juegos didácticos para niños ciegos y videntes""Sistema Constanz"L'ocupació laboral dels cecs a l'Estat espanyol està pràcticament equiparada a la de les persones amb visió, entrevista amb Pedro ZuritaONCE (Organización Nacional de Cegos de España)Prevención da cegueiraDescrición de deficiencias visuais (Disc@pnet)Braillín, un boneco atractivo para calquera neno, con ou sen discapacidade, que permite familiarizarse co sistema de escritura e lectura brailleAxudas Técnicas36838ID00897494007150-90057129528256DOID:1432HP:0000618D001766C10.597.751.941.162C97109C0155020