The cmdlet script I have written is working well. I want to use it when I am in any directory. I can do this by putting it in a directory on the PATH.

However, that is not really "installed" as a cmdlet. It always has the ".ps1" extension on the command name.

Must a module be written and installed?

The bigger issue is that everyone in my group should be able to use the script. Does that mean sourcing it into the All Users, All Hosts profile script? User's should run PowerShell using -NoProfile for production processes. If a .psm1 is created, will PowerShell always load it?


Turn your cmdlet into a PowerShell module and then place it into the common location for server-wide PowerShell modules. Even when using -noprofile your cmdlet will be available for all users.

There are many resources on how to create PowerShell modules online, it's a different question.


When I was faced with a similar problem, I rewrote the script to be a Function that used cmdlet binding. Then I put the function definition in my $PROFILE so that it's always available to me.

Depending on what you are really trying to do, this may work for you.

  • Thanks for your answer. A module looks like the best way to go. And, since PS 3.0, it does not need any mention in any of the profile scripts. – lit Jul 9 '17 at 22:21

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.