Advertisement
guyrleech

Output parameters to verbose channel

Feb 24th, 2021
1,315
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. Write-Verbose -Message "Got $($PSBoundParameters.Count) parameters"
  2.  
  3. $PSBoundParameters.GetEnumerator() | ForEach-Object `
  4. {
  5.     Write-Verbose -Message ( "{0} : `"{1}`"" -f $_.Key ,( $_.Value -join '" , "' ))
  6. }
  7.  
  8.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement