Windows Vista Forums
Vista Forums Home Join Vista Forums Donate Windows 7 Forum Vista Tutorials Tags

Welcome to Windows Vista Forums. Our forum is dedicated to helping you find solutions with any problems, errors or issues you are experiencing with Windows Vista. The Vista forum also covers news and updates and has an extensive Vista tutorial section that covers a wide range of tips and tricks.

Go Back   Vista Forums > Microsoft Technical Newsgroups > PowerShell

Exchange 2007 PowerShell..

Reply
 
LinkBack Thread Tools Display Modes
Old 01-15-2007   #1 (permalink)
jim
Guest


 
 

Exchange 2007 PowerShell..

Hopefully someone here is familiar with the Exchange 2k7 PowerShell..





I'm trying to export to CSV the LastName/FirstName of all users whose
mailboxes are not using the default database quota.


$allmbx= get-mailbox -resultsize unlimited| where
{$_.UseDatabaseQuotaDefaults -eq 'False'}



$allmbx | get-user -resultsize unlimited | select-object LastName, FirstName
| Export-Csv c:\defsize.csv





It generated the CSV alright, but it appeared to contain a lot more people
than I would've expected. I did a quick check on a handful of them and they
all had the default database quota parameter set to True.





Thanks in advance!




My System SpecsSystem Spec
Old 01-15-2007   #2 (permalink)
jim
Guest


 
 

Re: Exchange 2007 PowerShell..

Never mind. I needed to add a "$" before False. That is,

$allmbx= get-mailbox -resultsize unlimited| where
{$_.UseDatabaseQuotaDefaults -eq $false}



"jim" <jim@nospam.com> wrote in message
news:eSywCFMOHHA.3212@TK2MSFTNGP02.phx.gbl...
> Hopefully someone here is familiar with the Exchange 2k7 PowerShell..
>
>
>
>
>
> I'm trying to export to CSV the LastName/FirstName of all users whose
> mailboxes are not using the default database quota.
>
>
> $allmbx= get-mailbox -resultsize unlimited| where
> {$_.UseDatabaseQuotaDefaults -eq 'False'}
>
>
>
> $allmbx | get-user -resultsize unlimited | select-object LastName,
> FirstName | Export-Csv c:\defsize.csv
>
>
>
>
>
> It generated the CSV alright, but it appeared to contain a lot more people
> than I would've expected. I did a quick check on a handful of them and
> they all had the default database quota parameter set to True.
>
>
>
>
>
> Thanks in advance!
>
>
>



My System SpecsSystem Spec
Old 01-15-2007   #3 (permalink)
Desmond Lee
Guest


 
 

Re: Exchange 2007 PowerShell..

That is correct.

'False' -ne $false


--
............... All new, all fresh ..............
http://www.leedesmond.com/weblog/



"jim" wrote:

> Never mind. I needed to add a "$" before False. That is,
>
> $allmbx= get-mailbox -resultsize unlimited| where
> {$_.UseDatabaseQuotaDefaults -eq $false}
>
>
>
> "jim" <jim@nospam.com> wrote in message
> news:eSywCFMOHHA.3212@TK2MSFTNGP02.phx.gbl...
> > Hopefully someone here is familiar with the Exchange 2k7 PowerShell..
> >
> >
> >
> >
> >
> > I'm trying to export to CSV the LastName/FirstName of all users whose
> > mailboxes are not using the default database quota.
> >
> >
> > $allmbx= get-mailbox -resultsize unlimited| where
> > {$_.UseDatabaseQuotaDefaults -eq 'False'}
> >
> >
> >
> > $allmbx | get-user -resultsize unlimited | select-object LastName,
> > FirstName | Export-Csv c:\defsize.csv
> >
> >
> >
> >
> >
> > It generated the CSV alright, but it appeared to contain a lot more people
> > than I would've expected. I did a quick check on a handful of them and
> > they all had the default database quota parameter set to True.
> >
> >
> >
> >
> >
> > Thanks in advance!
> >
> >
> >

>
>
>

My System SpecsSystem Spec
Old 01-15-2007   #4 (permalink)
Andrew Watt [MVP]
Guest


 
 

Re: Exchange 2007 PowerShell..

The type for UseDatabaseQuoteDefaults is a Boolean.

You can confirm using

(get-mailbox "Joe Doe").UseDatabaseQuotaDefaults.GetType()

The potentially treacherous "feature" in PowerShell is that in code
you use $true or $false. In the console the Boolean values are
displayed as True or False.

Andrew Watt MVP

On Mon, 15 Jan 2007 11:21:48 -0500, "jim" <jim@nospam.com> wrote:

>Hopefully someone here is familiar with the Exchange 2k7 PowerShell..
>
>
>
>
>
>I'm trying to export to CSV the LastName/FirstName of all users whose
>mailboxes are not using the default database quota.
>
>
>$allmbx= get-mailbox -resultsize unlimited| where
>{$_.UseDatabaseQuotaDefaults -eq 'False'}
>
>
>
>$allmbx | get-user -resultsize unlimited | select-object LastName, FirstName
>| Export-Csv c:\defsize.csv
>
>
>
>
>
>It generated the CSV alright, but it appeared to contain a lot more people
>than I would've expected. I did a quick check on a handful of them and they
>all had the default database quota parameter set to True.
>
>
>
>
>
>Thanks in advance!

My System SpecsSystem Spec
Reply

Thread Tools
Display Modes



Similar Threads
Thread Thread Starter Forum Replies Last Post
Powershell excution policy on server with Exchange 2007 RD PowerShell 10 11-26-2007 10:16 AM
Running powershell via exchange 2007 maquinaloca PowerShell 6 11-07-2007 01:45 PM
Exchange 2007 and PowerShell Marco Shaw PowerShell 1 02-22-2007 02:20 PM
Exchange 2007 "Activate the PowerShell" One liner Contest Abhishek Agrawal [MSFT] PowerShell 0 06-17-2006 09:39 PM
Monad / PowerShell / Exchange 2007 Guy Thomas PowerShell 4 06-14-2006 04:49 PM


Vista Forums is an independent web site and has not been authorized,
sponsored, or otherwise approved by Microsoft Corporation.
"Windows Vista", the Start Orb, and related materials are trademarks of Microsoft Corp.
© Designer Media Ltd

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53