Tee-object

I haven’t written a blog lately cause I have been busy but I wanted to just point out a cool cmdlet in powershell called Tee-object . You can use this cmdlet to send output to a file and also to the screen as well . So if you want to keep track of your output and also be able to see what is going on then this is cool cmdlet to use . Hope this has been helpful . I know I have been doing a lot of powershell stuff basically cause its a very powerful shell . I will go back to doing some c# stuff soon .

 Example of tee-object :

$servername = ” MyServer” | tee-object c:\serverlist.txt

Chris

Advertisements