Can someone help me convert this ps command into a command that will output to html? If I try the below command it just outputs a blank html page. I believe its becuase of the write-host command. It displays the correct info on the screen but will not output to html. Thanks.
(get-mailboxdatabase *Resource*) | foreach-object {write-host $_.name (get-mailbox -database $_.name).count} | ConvertTo-HTML name,databaseCount | Out-File C:\Test2.html↧