Fixing Error ‘Get-CsUser Policy Still Applied To Account’!

By |2018-07-04T17:27:06+00:00July 4th, 2018|Skype|0 Comments

Recently one of our customers have had an issue where the ‘Get-CsUser’ command would error due to the user still being a part of a policy however the policy had been deleted already. The error will look something along the lines of:

In this instance the issue was with a hosted voicemail policy, it is always best practice to remove all users from policy’s if you decide you want to delete them. To see what policy users have applied to them you can run the following command:

Get-CsUser | Where-Object {$_.HostedVoicemailPolicy -match “^2”

In order to remove these policies from the accounts you will simply need to run the following command (of course replace the name of the policy to the one applied to your user accounts):

Get-CsUser | Where-Object {$_.<policy name> -match “^14”} | Grant-CsExternalAccessPolicy -PolicyName $null

Hope this helps!

Leave A Comment

like what you see? 

Sign-up to our newsletter and never miss out on the latest blogs, events and tech news from the world of risual
SUBSCRIBE!
Give it a try, you can unsubscribe anytime.