Quick Fix: Hide users from Essentials 2012 R2 Dashboard
September 18, 2014 19 Comments
If you have installed Exchange 2013 into your Essentials network, chances are upon loading the dashboard you will see a large amount of new users appear, you may even notice an alert telling you, you have too many users!
These are all of the exchange service accounts, and you may decide you don’t want them to appear in your dashboard.
Of course you know the solution by now will involve PowerShell, i mean why would you even try to do this any other way?
The CMDLET we are going to want to use is, Set-WSSUserDashboardVisibility, it is a simple enough command with only two options.
Set-WssUserDashboardVisibility dfunk –Hidden
But doing that for each user is boring, we want to do it all in one go for all users. So we do this..
Luckily for us each Exchange User fits one of two criteria so it is easy for us to target them. They either have no firstname, or no lastname value.
$users = Get-WssUser | Where { ($_.Firstname -eq “”) –or ($_.LastName –eq “”) }
foreach ($user in $users)
{
Set-WssUserDashboardVisibility $user.UserName -Hidden
}
The above screen shot is an taken of PowerShell ISE
If you use that command all of your Exchange Service accounts will disappear from the dashboard and your license error will be solved.
In my environment, this also hid my administrator account. So, to add that back i use the command,
Set-WssUserDashboardVisibility dfunk –Visible
And all was right in the world of Essentials once again.
Couple of reboots or apply cu6 or any update and they are back though. I still haven’t been able to make these go away forever, Bad mistake by Microsoft. Doesn’t happen in R1.
I haven’t seen that behaviour, do you have that currently on a server we could look at?
Seeing exactly the same problem as Mark above – these HealthMailbox accounts keep coming back! And I think I know how to reliably reproduce it…
If I manually Set-WssUserDashboardVisibility -Hidden on one of these accounts THEN restart the ‘Microsoft Exchange Health Manager’ service on the Exchange 2013 (CU7) server, a new one (with a new unique GUID) comes back in its place after a few minutes.
At first I thought the simple act of restarting the HM service / rebooting the Exchange server is recreating new HealthMailbox* accounts for the fun of it, but it only does so if the old ones are hidden with Set-WssUserDashboardVisibility.
If I don’t hide them, the count under AD stays at 11 (yes I have 11 of these blasted things), no matter how many times the HM service / server is restarted. I run your script, restart HM and 11 new accounts appear – brings total to 22 (11 shown in the Essentials dashboard). Run again, 33 in AD.
So I try start from scratch; delete all under DOMAIN.local/Microsoft Exchange System Objects/Monitoring Mailboxes and restart HM. Back to 11. Restart again, still 11. Run script, hidden from dashboard. Reboot Exchange, more back in dashboard. Tearing. Hair. Out.
HI Darren,
Really appreciate your message. That is odd behaviour indeed. I’m not sure I have an answer for you currently but I will investigate as best I can!
So, just to confirm my current lab setup is CU6.
I do not have anything under the Container DOMAIN.local/Microsoft Exchange System Objects, except a security group and a SystemMailbox(guid)
My healthmailboxes(guid) are under Domain.local/Users – I only have 2, both set to hidden from dashboard.
Restarting MSExchangeHM Service does not add more HealthMailboxes or reset their visibility on the dashboard.
Just downloading CU7.
That’s interesting. Perhaps their placement in AD is key – I have to enable Advanced Features in ADUC to show the Microsoft Exchange System Objects/Monitoring Mailboxes tree. None appear under /Users (although there are some service accounts which your script successfully hid – including for Trend Worry Free Advanced).
Not sure if it’s due to the particular Exchange release, but I should mention I’m using the Dell media for Windows 2012 R2 Essentials /with Update/ according the SHA1 (FFDE99A43C31ACB97F9F12FE300AD686A3B2E5F1).
Hmm, I’ve just spotted a WseInvisibleToDashboard security group! Will try that and report back.
Eureka! Adding the 11 HealthMailbox accounts to the WseInvisibleToDashboard security group has done the trick. They’re hidden from the Dashboard and restarting the HM service doesn’t make them reappear.
Great!
I can confirm after applying CU&, I also now have 11 Health Mailboxes (all disabled) under MS Exchange System Objects/Monitoring Mailboxes, that is in addition to the other 2 Health Mailboxes which still exist in domain/users.
Will see what happens when I restart services etc.
So, running that Set-WSSUserDashboardVisibility command seems to add the Mailboxes to that WSEInvisibleToDashboard group. Indeed I can now reproduce this issue as restarting the HM Service will recreate an additional 11 Health Mailboxes.
The question is why!
Could not get this to work, had to hide them one at a time. Also after applying CU6 have 12 new HealthMailbox….. and 1 SM_c2….. users to hide.
PS C:\Windows\system32> $users = Get-WssUser | Where { ($_.FirstName -eq “”) -or ($_.LastName -eq “”) } foreach ($user in $users) { Set-WssUserDashboardVisibility $user.UserName -Hidden }
At line:1 char:96
+ … foreach ($user in $users) { Set-WssUserDashboardVisibility $user.UserName -Hidde …
+
Unexpected token ‘in’ in expression or statement.
At line:1 char:95
+ … foreach ($user in $users) { Set-WssUserDashboardVisibility $user.UserName -Hidd …
+
Missing closing ‘)’ in expression.
At line:1 char:105
+ … $user in $users) { Set-WssUserDashboardVisibility $user.UserName -Hidden }
+
Unexpected token ‘)’ in expression or statement.
+ CategoryInfo : ParserError: (:) [], ParentContainsErrorRecordException
+ FullyQualifiedErrorId : UnexpectedToken
If you want to run it as a single command like that (as in all on one line, you would need to add in a “;” after the closing curly bracket and before ‘foreach’)
$users = Get-WssUser | Where { ($_.FirstName -eq “”) -or ($_.LastName -eq “”) ; foreach ($user in $users) { Set-WssUserDashboardVisibility $user.UserName -Hidden }
($_.LastName -eq “”) ; foreach ($user in $users)
It is shown in the post over several lines, for that reason.
Is there a way to do this on 2012 non-R2? I have a bunch of service accounts I need to remove from the essentials dashboard because we need to add new User accounts
Im sure there is, just need to load up my VM..
I had to edit an XML file in order to hide the users, which is find for one or two but more tricky if you have a tonne of them to do.
Will blog the script I wrote.
judging by this thread this issue still hasn’t been resolved its quite painful as in a production environment it will continuously put your user limit over the licensed amount, not really that cool for the expense of the software.
I think the workaround from Darren, has been seen to work.
The question I am trying to find the answer to, is why running the CmdLet rather than manually adding a user to the group causes this issue.
man I cannot seem to get this to work. typing manually just leaves me with caret in shell and nothing happens and (due to WP) copy/paste gives format error.
tried doing on single line but system (2012r2 full with essentials role) did not like comma.
guess will have to do one by one.
There is no output if it ‘works’ just returns you to a prompt. try just the $users line, does that work?
Realize this has been a while since this thread has been active, but I have experienced the same issue under Exchange 2013 CU 18.
The first mentioned cmdlet:
Set-WssUserDashboardVisibility –Hidden
Will hide each account from the dashboard and Exch will recreate the health mailboxes. However; if you modify the cmdlet to:
Set-WssUserDashboardVisibility -Visible:$False
This Cmdlet adds the accounts to the WseInvisibleToDashboard security group
Good luck all