If I have imported moduleFoo to my script in which there is a function Bar().
Can I call this function somehow like:
moduleFoo.Bar
instead of
Bar
So that the person reading the script can understand from which module this Bar is called?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
You can give to your function name like:
but this is not respecting the standard powershell naming convention for function or cmdlet (verb-noum).
You can also create alias that prefix the function/cmdlet with
modulefoo.If you only need to know the name of the module to which the function/cmdlet belongs you can use: