Skip to main content
Notice removed Authoritative reference needed by CommunityBot
Bounty Ended with no winning answer by CommunityBot
added 73 characters in body
Source Link
fohrums
  • 520
  • 2
  • 12
  • 29
UPDATED-STATEMENT: 20190815@000000@THU Working on creating a powershell initial profile for current user only and without running as admin that is authorized to run commands from from the ps-profilefile such as custom aliases that isn't cmlet specific.
UPDATED-STATEMENT: 20190825@112626@SUN Created working powershell initial profile-file that is only for current user and is authorized to run scripts via setting execution policy as "RemoteSigned" but custom aliases don't work. Only alias for notepad works.
UPDATED-STATEMENT: 20190901@171442@SUN Still no way to run an executable with cmd like params or arguments without error.
UPDATED-STATEMENT: 20190809@171100@SUN Removed the "%" ps alias for "ForEach-Object" and instead used just one parameter but ps doesn't recognize parameters. How do I get powershell to recognize parameters?
UPDATED-STATEMENT: 20190915@105906@SUN Bounty ended no solution so far.
UPDATED-STATEMENT: 20190815@000000@THU Working on creating a powershell initial profile for current user only and without running as admin that is authorized to run commands from from the ps-profilefile such as custom aliases that isn't cmlet specific.
UPDATED-STATEMENT: 20190825@112626@SUN Created working powershell initial profile-file that is only for current user and is authorized to run scripts via setting execution policy as "RemoteSigned" but custom aliases don't work. Only alias for notepad works.
UPDATED-STATEMENT: 20190901@171442@SUN Still no way to run an executable with cmd like params or arguments without error.
UPDATED-STATEMENT: 20190809@171100@SUN Removed the "%" ps alias for "ForEach-Object" and instead used just one parameter but ps doesn't recognize parameters. How do I get powershell to recognize parameters?
UPDATED-STATEMENT: 20190815@000000@THU Working on creating a powershell initial profile for current user only and without running as admin that is authorized to run commands from from the ps-profilefile such as custom aliases that isn't cmlet specific.
UPDATED-STATEMENT: 20190825@112626@SUN Created working powershell initial profile-file that is only for current user and is authorized to run scripts via setting execution policy as "RemoteSigned" but custom aliases don't work. Only alias for notepad works.
UPDATED-STATEMENT: 20190901@171442@SUN Still no way to run an executable with cmd like params or arguments without error.
UPDATED-STATEMENT: 20190809@171100@SUN Removed the "%" ps alias for "ForEach-Object" and instead used just one parameter but ps doesn't recognize parameters. How do I get powershell to recognize parameters?
UPDATED-STATEMENT: 20190915@105906@SUN Bounty ended no solution so far.
deleted 76 characters in body
Source Link
fohrums
  • 520
  • 2
  • 12
  • 29

I want to be able to use Powershell instead of Command Prompt. In order for me to do so I need to set up Aliases that are NOT cmdlets OR something as basic like notepad.exe. The aliases I want to define are from executables with parameters that I find to be too much to type for a repetitive task. Below is an alias I'm trying to achieve, but can't get it to work. This custom alias is added within PS as session only for demonstration purposes (once it works then i'll add it to the currentuser ps-profilefile) So, my question is: how do I define an alias that isn't a cmdlet, but an executable with more thanat least one parameter or more? I mention more than one parameter, because an alias with just an executable works.

I want to be able to use Powershell instead of Command Prompt. In order for me to do so I need to set up Aliases that are NOT cmdlets OR something as basic like notepad.exe. The aliases I want to define are from executables with parameters that I find to be too much to type for a repetitive task. Below is an alias I'm trying to achieve, but can't get it to work. This custom alias is added within PS as session only for demonstration purposes (once it works then i'll add it to the currentuser ps-profilefile) So, my question is: how do I define an alias that isn't a cmdlet, but an executable with more than one parameter? I mention more than one parameter, because an alias with just an executable works.

I want to be able to use Powershell instead of Command Prompt. In order for me to do so I need to set up Aliases that are NOT cmdlets OR something as basic like notepad.exe. The aliases I want to define are from executables with parameters that I find to be too much to type for a repetitive task. Below is an alias I'm trying to achieve, but can't get it to work. This custom alias is added within PS as session only for demonstration purposes (once it works then i'll add it to the currentuser ps-profilefile) So, my question is: how do I define an alias that isn't a cmdlet, but an executable with at least one parameter or more?

added 1231 characters in body
Source Link
fohrums
  • 520
  • 2
  • 12
  • 29
  • Do you have a script that can run commands?
    • Yes, pls. see script below: for content & the it's error upon ps launch
- script content:
new-item alias:npa -value notepad.exe /A newnew_ansifile.txt
- script content error upon opening ps:
  • Do you have a script that can run commands?
    • Yes, pls. see script below:
- script content:
new-item alias:npa -value notepad.exe /A new
- script content error upon opening ps:
  • Do you have a script that can run commands?
    • Yes, pls. see script below for content & the it's error upon ps launch
new-item alias:npa -value notepad.exe /A new_ansifile.txt
added 1231 characters in body
Source Link
fohrums
  • 520
  • 2
  • 12
  • 29
Loading
Tweeted twitter.com/super_user/status/1172661345197711361
added 11 characters in body
Source Link
fohrums
  • 520
  • 2
  • 12
  • 29
Loading
added 208 characters in body
Source Link
fohrums
  • 520
  • 2
  • 12
  • 29
Loading
Notice added Authoritative reference needed by fohrums
Bounty Started worth 50 reputation by fohrums
added 83 characters in body
Source Link
fohrums
  • 520
  • 2
  • 12
  • 29
Loading
added 1 character in body
Source Link
fohrums
  • 520
  • 2
  • 12
  • 29
Loading
added 122 characters in body
Source Link
fohrums
  • 520
  • 2
  • 12
  • 29
Loading
added 362 characters in body
Source Link
fohrums
  • 520
  • 2
  • 12
  • 29
Loading
added 362 characters in body
Source Link
fohrums
  • 520
  • 2
  • 12
  • 29
Loading
added 139 characters in body
Source Link
fohrums
  • 520
  • 2
  • 12
  • 29
Loading
Enhanced formatting, corrected typos
Source Link
LotPings
  • 7.3k
  • 1
  • 16
  • 29
Loading
Source Link
fohrums
  • 520
  • 2
  • 12
  • 29
Loading