Quantcast
Channel: Exchange Server 2013 - Administration, Monitoring, and Performance 论坛
Viewing all articles
Browse latest Browse all 8719

Database filter not working in Powershell command

$
0
0

I'm trying to run a powershell query to find what users have a retention policy applied to them. However, I'm also trying to filter out a database that contains service accounts, which should be excluded. The issue I'm running into is that the database filter doesn't seem to be working. if I use "database -ne mydb" I get all accounts, including from that db. If I use "database -eq mydb" I get zero results. I can see on the MS doc about filterable properties that this is one of them that should work with get-mailbox. http://technet.microsoft.com/en-us/library/bb738155(v=exchg.150).aspx

Can anybody point me towards what I have wrong in this command:

Get-Mailbox -ResultSize unlimited -Filter {(ManagedFolderMailboxPolicy -eq $null) -and (database -ne "Service Accounts - DAG")} | fl name,database

I'm running exchange 2010 but I can't seem to find the right forum for that, is it in the archives somewhere?

Thanks in advance,

Joel


Viewing all articles
Browse latest Browse all 8719

Trending Articles