Quantcast
Channel: Hey, Scripting Guy! Blog
Viewing all articles
Browse latest Browse all 3333

PowerTip: Split PowerShell Output Between Console and Variable

$
0
0

Summary: Learn an easy way to save Windows PowerShell output in a variable and still output to the console.

Hey, Scripting Guy! Question What is an easy way to display Windows PowerShell output from a cmdlet to the console, and yet store the results in a variable at the same time?

Hey, Scripting Guy! Answer Use the OutVariable parameter:

           GSV -OutVariable S


Viewing all articles
Browse latest Browse all 3333

Trending Articles