Quantcast
Channel: Exchange Server 2010 forum
Viewing all articles
Browse latest Browse all 8820

Numerical value in script

$
0
0

Hi all

I'm trying to get a useable result from the following script:

Get-mailboxdatabase -status |sort name | ft name, databasesize, availablenewmailboxspace

As such, the script works but the output comes out as "9.258 GB 9941090304 bytes" and not just "9.258 GB"

After browsing around a bit, I modified the script to the following:

Get-mailboxdatabase -status |sort-object name | ft name, @{label="databasesize(MB)";expression={$_.databasesize,Value.ToMB()}},@{label="availablenewmailboxspace(MB)";expression={$_.availablenewmailboxspace.Value.ToMB()}}

However - all the values in 'databasesize' and 'availablenewmailboxspace' are now blank.

Anyone able to assist a little? All inputs and comments are highly appreciated :)

/Trev


Viewing all articles
Browse latest Browse all 8820

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>