Saturday, April 14, 2012

Redirecting all output from a PowerShell script using the new PowerShell 3.0 asterisk / star / * redirection:


powershell -Command { .\scriptfile.ps1 *> out.log }

Other types of redirection:
  • Pipeline: 1
  • Error: 2
  • Warning: 3
  • Verbose: 4
  • Debug: 5
  • All streams: *

0 comments:

Post a Comment