Suppress PowerShell output messages new outlook application object is created?
$outlook = New-Object -ComObject outlook.application
$outlookItem = $outlook.CreateItem("olMailItem")
I already tried using these approaches. They did not work:
$outlook = New-Object -ComObject outlook.application > $Null
$outlook = New-Object -ComObject outlook.application |Out-Null
($outlook = New-Object -ComObject outlook.application) |Out-Null
These are the output message that I don't want them on the screen:
Application : Microsoft.Office.Interop.Outlook.ApplicationClass
Class : 5
...
...