Convert-BQSToByte
SYNOPSIS
Converts a ByteQuantifiedSize object to bytes regardless of what serialization did to the type
SYNTAX
DESCRIPTION
Use this conversion to convert an Exchang ByteQuatifiedSize object to raw # of bytes. This function detects whether or not the object you received from Exchange is strong typed, or has been borked through serialization (remoting). Has been tested with Exchange 2010 - 2016, and works both on an Exchange server as well as via remoting (with our without full serialization enabled).
EXAMPLES
EXAMPLE 1
Name='TotalItemSizeMB' expression={[Math]::Floor((Convert-BQSToByte $_.TotalItemSize)/1MB)} } Returns the mailbox size of jefke in Mb
PARAMETERS
-size
The object Exchange returned
Type: Object
Parameter Sets: (All)
Aliases:
Required: True
Position: 1
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False
CommonParameters
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.