Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

7
  • What's wrong with writing a PS script and passing arguments to it when you call it?
    – DavidPostill
    Commented Aug 11, 2019 at 8:11
  • Is PS Scripting a position-file (or script.ps1) that has commands regardless of 1-liners being executed by running the script within powershell? This seems far from reach if I was in a different directory. So in this case to run an alias via ps-script I have to give the path name to the script to run it when i'm in a different directory.
    – fohrums
    Commented Aug 11, 2019 at 10:20
  • You can add the directory containing your powershell scripts to you PATH ...
    – DavidPostill
    Commented Aug 11, 2019 at 11:10
  • I can't understand the function FB: Why do you use %, which is the alias for ForEach-Object, and why are you escaping it using %%? What do you have in option1 and option1a?
    – harrymc
    Commented Sep 7, 2019 at 20:23
  • I see as it says so immedidiately. I removed it and decided to use one parameter instead (by now updated my ps-profile) and noticed that ps is needing the parameter(s) used to be defined. E.g. New-Item : A parameter cannot be found that matches parameter name '<parameter2>'. is there any way to have ps recognize parameters to an executable?
    – fohrums
    Commented Sep 8, 2019 at 7:10