# set an alias for a command ( or function ) and specify parameters?

**URL:** <https://forums.powershell.org/t/set-an-alias-for-a-command-or-function-and-specify-parameters/1957>\
**Category:** PowerShell Help\
**Created:** [October 11, 2013, 7:06am UTC](https://forums.powershell.org/t/set-an-alias-for-a-command-or-function-and-specify-parameters/1957 "2013-10-11T07:06:12Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![iancaseydouglas](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.powershell.org/iancaseydouglas/32/506_2.png) [@iancaseydouglas](https://forums.powershell.org/u/iancaseydouglas)\
**Post date:** [October 11, 2013, 7:06am UTC](https://forums.powershell.org/t/set-an-alias-for-a-command-or-function-and-specify-parameters/1957/1 "2013-10-11T07:06:12Z")

</div>

Is it possible to set an alias for a command ( or function ) and specify parameters? For a simplified example –

# define alias

set-alias -name show-members -value “Get-QADGroupMember -Identity $args”

# usage example

show-members \<groupname\>

(I’m trying to do this with some custom functions I have given to users. )

Many thanks!

---

<div class="post-metadata">

**Author:** ![donj](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.powershell.org/donj/32/137_2.png) [@donj](https://forums.powershell.org/u/donj)\
**Post date:** [October 11, 2013, 8:42am UTC](https://forums.powershell.org/t/set-an-alias-for-a-command-or-function-and-specify-parameters/1957/2 "2013-10-11T08:42:44Z")

</div>

Not an alias, no. Aliases are only nicknames for commands.

That said, there’s nothing stopping you from defining a function that runs a command and uses specific parameters. That’s what “help” is.

---

<div class="post-metadata">

**Author:** ![dotnVo](https://avatars.discourse-cdn.com/v4/letter/d/4af34b/32.png) [@dotnVo](https://forums.powershell.org/u/dotnVo)\
**Post date:** [May 16, 2024, 8:57pm UTC](https://forums.powershell.org/t/set-an-alias-for-a-command-or-function-and-specify-parameters/1957/3 "2024-05-16T20:57:00Z")

</div>

Closed on May 16, 2024, 8:57pm UTC


