header
header Register : : Login header
header
divider
menuleft
menuright
submenu
left

[August 25th, 2008] Check the home page regarding PowerShell related news from a brand new sponsor: Idera

Invoking notepad from a script
Last Post 24 Oct 2008 02:59 PM by SynJunkie. 2 Replies.
Printer Friendly
Sort:
PrevPrev NextNext
You are not authorized to post a reply.
Author Messages
SynJunkieUser is Offline
New Member
New Member
Posts:97
Avatar

--
24 Oct 2008 01:21 PM  

Hi guys.

 

Is it possible to write the output of a script to say notepad or excel and have that file automatically open when the script finishes?

Regards

 

Lee

ShayUser is Offline
Basic Member
Basic Member
Posts:269
Avatar

--
24 Oct 2008 01:37 PM  
Yes, you can. Use the invoke-item cmdlet when you finish writing the output, for instance:

PS > gps | export-csv procs.csv
PS > invoke-item procs.csv

The same for text files:

PS > gps | out-file procs.txt
PS > invoke-item procs.txt



Shay Levy
Windows PowerShell MVP
http://blogs.microsoft.co.il/blogs/ScriptFanatic
SynJunkieUser is Offline
New Member
New Member
Posts:97
Avatar

--
24 Oct 2008 02:59 PM  
Thanks Shay. it now seems so obvious. I'm sure if I haad thought about that a little more I would have realised that I could have done that. Now there's a lesson for me!

Thanks

Lee
You are not authorized to post a reply.

Active Forums 4.1
right
   
footer Sponsored by Quest Software • SAPIEN Technologies • ShellTools, LLC • Microsoft Windows Server 2008 footer
footer