Quantcast
Channel: PowerShell.com – PowerShell Scripts, Tips, Forums, and Resources
Viewing all articles
Browse latest Browse all 6937

reuse common commands

$
0
0

I often find myself making the same queries such as gwmi win32_bios for example and the only variable that changes is the machine name or the username.

can someone point me in the right direction to learn how to make these reuseable commands where I click a .ps1 and it asks me for the variable.

 

So what I basically need is a pop out to aske me to type in the variable.

 

I also do not know how to open a piped csv file with excel from within powershell.

 

eg I know how to open with notepad

 

 

PS H:\> notepad C:\Temp\CommandHistory.CSV

 

 


Viewing all articles
Browse latest Browse all 6937

Trending Articles