Quantcast
Channel: PowerShell
Viewing all articles
Browse latest Browse all 15370

Exporting a command

$
0
0

I often find myself putting a multi-piped command together in the PowerShell CMD, and after I get it to work the way I want I step back and think... you know, this would work better if I had this in ISE to be able to just add it to a loop, but I don't really want to retype all this.

Powershell
Get-History-Count1|select-ExpandPropertyCommandLine>c:\psresults\cmd.txt

Now I can just copy/paste that into ISE. Not sure why I didn't think of it before.

There are probably easier ways to do this, but I just thought I'd share my epiphany.


Viewing all articles
Browse latest Browse all 15370

Latest Images

Trending Articles



Latest Images

<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>