Showing posts with label powershell. Show all posts
Showing posts with label powershell. Show all posts

Tuesday, March 1, 2022

Add-WindowsCapability failed. Error code = 0x800f0954 – RSAT Fix

This is a post by Paul at the sysadmin channel

If you have tried to install Remote Server Administration tools for Windows 10 version 1809, 1903 or later you might have come across: Add-WindowsCapability failed. Error code = 0x800f0954. If you haven’t, that’s great! If you have, you’re in luck because today we’re going to go over the steps needed to fix the issue.

Add-WindowsCapability -Name RSAT Error

Tuesday, December 29, 2020

Removing the device partnership in Exchange 2010 using Powershell

Apparently Exchange 2010 SP1 brought a 10 mobile device per mailbox limit. This is a problem if you are letting a bunch of folks hook their iPhones into a common mailbox to share the calendar. The mailbox gets the message:

You have 10 phone partnerships out of the maximum allowed 10 partnerships. After you reach the maximum, you can't create additional partnerships until you delete existing ones from your account. To do so, sign in to Outlook Web App, click Options > Phone > Mobile Phones, and delete any unused partnerships.

Fortunately, the fix is pretty simple (excellent full write-up here), if you just want to increase the number of devices for your default policy.

  1. Start an Exchange powershell instance
  2. Run this to set max total devices (change 20 to whatever you want max to be)
    Get-ThrottlingPolicy | Set-ThrottlingPolicy –EASMaxDevices 20
  3. Then run this to set the maximum number of simultaneous devices (again, you can change the 20)
    Get-ThrottlingPolicy | Set-ThrottlingPolicy –EASMaxConcurrency 20

Alternativelly, you can remove all partnertships for a mailbox with the following command:

foreach ( $identity in Get-ActiveSyncDeviceStatistics -Mailbox username | Select-Object -Property "Identity" ) {
Remove-ActiveSyncDevice -Identity $identity.identity -Confirm:$true
}

Also you can remove all device partnerships where synchronization date (LastSuccessSync) is more than 30 days ago:

$DevicesToRemove = Get-ActiveSyncDevice -Result Unlimited | Get-ActiveSyncDeviceStatistics | Where {$_.LastSuccessSync -le (Get-Date).AddDays(“-30”)}

$DevicesToRemove | Remove-ActiveSyncDevice