Why are my email messages not showing up?

I replaced some of them:

Write-Verbose "Doing somthing..." 

and I run my script through PS ISE, for example:

 .\FooScript.ps1 -verbose 

But in the output window, I do not see any of these messages.

How can I output messages labeled Verbose?

+4
source share
1 answer

You need to add

 [CmdletBinding()] 

at the beginning of your script and use

 -verbose 

to see detailed messages.

More details by typing:

 help about_functions_advanced 
+10
source

Source: https://habr.com/ru/post/1443664/


All Articles