B
B
beduin012019-02-15 11:11:29
PowerShell
beduin01, 2019-02-15 11:11:29

Where to store shortcards for powershell?

I want to implement an analogue of alias from Linux in the Windows console. What is the best way to do this? I'm thinking of writing small scripts in Powershell, but the problem is that it's not clear where to put them so that they run without specifying the path.

Answer the question

In order to leave comments, you need to log in

3 answer(s)
P
Prog, 2019-02-15
@beduin01

%windir%\system32\WindowsPowerShell\v1.0\ps.ps1
or
$env:Path += ";C:\your scripts folder"

A
azarij, 2019-02-15
@azarij

write a bunch of functions, hammer them into your powershell profile or load them from a file into the profile via dot-source and you can also set convenient names for them via set-alias.
and you can stir up aliases on pure cmd: https://stackoverflow.com/questions/20530996/alias...

C
Crovax, 2019-02-18
@Crovax

I recommend starting to look towards your modules:
https://docs.microsoft.com/en-us/powershell/develo...

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question