Write Verbose - PowerShell


Write-Verbose outputs verbose diagnostic information to the host, typically used for debugging and troubleshooting purposes. It provides detailed messages that can help identify and resolve issues in scripts or commands.


Write-Verbose [[-InputObject] <PSObject>] [-Message] <string> [-Category] <string> [-Verbose] [-IncludeCallerInfo] [-Bypass] [-Skip] [-Exclude] [-Stream] <string> [-Utc] [-SortOrder] <string>


Specifies an object to write verbose information about.

The message to write to the host.

The category name associated with the message.

Force the command to output verbose messages, even if Verbose preference is not set.

Include caller information in the verbose message.

Bypass the Write-Verbose preference and write the message.

Skip writing the message if the Write-Verbose preference is not set.

Exclude writing the message if the Write-Verbose preference is set.

The output stream to write the message to.

Write the message with a UTC timestamp.

The sort order of the verbose message entries.


Output a Verbose Message:

Write-Verbose "This is a verbose message."

Write a Verbose Message with a Category:

Write-Verbose -Message "This is a verbose message." -Category "Troubleshooting"

Output Verbose Messages for All Objects in an Array:

$objects = Get-ChildItem
Write-Verbose -InputObject $objects -Message "Verbose message for each object:"

Common Issues

  • Verbose messages not appearing: Ensure that the Write-Verbose preference is set to Verbose or higher.
  • Verbose messages not informative: Provide meaningful and detailed messages to help diagnose issues.
  • Too many verbose messages: Use the -Skip or -Exclude options to prevent excessive messages if the Write-Verbose preference is not set.


Write-Verbose can be integrated with other commands using the pipeline. For example, to write verbose messages for the output of a Get-Item command:

Get-Item | Write-Verbose
  • Get-Verb: Get the verbs (commands) available in the current PowerShell session.
  • Set-Verb: Set the preferences for a specific verb.