Advertisement
Lee_Dailey

Sample PSScriptAnalyzer output

Feb 18th, 2017
226
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.53 KB | None | 0 0
  1. RuleName Severity Line Message
  2. -------- -------- ---- -------
  3. PSUseCmdletCorrectly Warning 8 Cmdlet 'Write-Warning' may be used incorrectly. Please
  4. check that all mandatory parameters are supplied.
  5.  
  6.  
  7.  
  8.  
  9.  
  10.  
  11.  
  12. PSAvoidUsingCmdletAliases Warning 53 'gci' is an alias of 'Get-ChildItem'. Alias can introduce
  13. possible problems and make scripts hard to maintain. Please
  14. consider changing alias to its full content.
  15.  
  16.  
  17.  
  18.  
  19.  
  20.  
  21. PSAvoidUsingWriteHost Warning 19 File 'Reddit_-_chy_vak_-_if (test-path) statement returning
  22. an error_-_take-2.ps1' uses Write-Host. Avoid using
  23. Write-Host because it might not work in all hosts, does not
  24. work when there is no host, and (prior to PS 5.0) cannot be
  25. suppressed, captured, or redirected. Instead, use
  26. Write-Output, Write-Verbose, or Write-Information.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement