Ureader.com  
Microsoft software help and Community
   home   |   control panel login   |   archive   |  
 
Exchange
2000.active.directory
2000.admin
2000.announcements
2000.app.conversion
2000.applications
2000.clients
2000.clustering
2000.connectivity
2000.development
2000.documentation
2000.general
2000.information.store
2000.interop
2000.kms
2000.misc
2000.protocols
2000.realtime.collabo.
2000.setup
2000.transport
2000.win2000
admin
application.conversion
applications
clients
clustering
connectivity
design
development
misc
mobility
setup
tools
  
 
date: Tue, 15 Apr 2008 09:36:00 -0700,    group: microsoft.public.exchange.development        back       


Quota values in bytes, removing "friendly" formatting when using c   
Hi,

I'm trying to get the values of ProhibitSendReceiveQuota and others in C#. 
However I need to get the values in their Byte value (because im comparing 
them to values set previously, also from code). 

I cant find a way to ask for *just* B, rather than PowerShell giving me KB, 
MB, GB depending on how big the value is. Is there a way to stop PowerShell 
giving me the automatically formatted, human "friendly" values?

Here is a code snippet to give you an idea:

 Command cmd = new Command("get-mailbox");
 cmd.Parameters.Add(new CommandParameter("Identity", username));
 ...
 Collection<PSObject> results = pipeline.Invoke();
 long softquota = (long)results[0].Properties["IssueWarningQuota"].Value;

...last line fails with invalid cast, but hopefully shows you what im trying 
to do.

Mark
date: Tue, 15 Apr 2008 09:36:00 -0700   author:   m.r.wallis

Google
 
Web ureader.com


    COPYRIGHT 2007, YARDI TECHNOLOGY LIMITED, ALL RIGHT RESERVE  |   contact us