Friday, January 3, 2014

Exchange Powershell command error message Microsoft.PowerShell.Commands.Internal.Format.AutosizeInfo Microsoft.PowerShell.Commands.Internal.Format.TableHeaderInfo

Exchange Powershell command error message
 Microsoft.PowerShell.Commands.Internal.Format.AutosizeInfo Microsoft.PowerShell.Commands.Internal.Format.TableHeaderInfo
On executing the below powershell on exporting to html file it will result error message in the html file
Get-MailboxDatabase -Status | Sort-Object DatabaseSize -Descending | ft Name, DatabaseSize -Autosize | ConvertTo-HTML -head $a | Out-File C:\Temp\DBFileSize.htm
Solution:
On removing the format-table and -autosize from the powershell command the error message disappered. Finally the command changed as follows,
Get-MailboxDatabase -Status | Sort-Object DatabaseSize -Descending | Select-Object Name, DatabaseSize, AvailableNewMailboxSpace | ConvertTo-HTML | Out-File C:\Temp\DBFileSize.htm

No comments:

Post a Comment

The blog is written to the share the knowledge mainly on Microsoft Exchange Server and other Microsoft product that experienced on day-to-day life.