Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

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.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8464549
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T14:46:48+00:00 2026-06-10T14:46:48+00:00

Usually powershell script files end with .ps1, and modules end with .psm1. Can one

  • 0

Usually powershell script files end with .ps1, and modules end with .psm1.

Can one have powershell scripts/modules in files with no extension? Just “build” or “start” and so on? Will this cause an issue in any specific environment?

If yes, Can one have powershell scripts/modules in files with other “texty” extensions like .sh, .ps etc?


Is there an easier way to invoke powershell scripts instead of keying in .\script.ps1 arg1, arg2 , for example like : go arg1, arg2?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-10T14:46:50+00:00Added an answer on June 10, 2026 at 2:46 pm

    No, you can’t. The error message for Import-Module is pretty clear:

    Import-Module : The extension '.xyz' is not a valid module extension. The supported module extensions are '.dll',
    '.ps1', '.psm1', '.psd1', '.cdxml' and '.xaml'. Correct the extension then try adding the file
    

    And if you try to call a script with a non-standard extension, Windows will simply pop the “What program would you like to open this with?” dialog. If you choose to open with Powershell, a new Powershell process will be spawned, which will just do the same thing.

    If you try to assign a new extension, like .xyz to always be opened with Powershell, you will end up with an never-ending series of Powershell processes being spawned, each attempting in vain to open the file with a new instance of Powershell. I just tried it 🙂

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have created a powershell module (.psm1) file that includes a few other powershell
I have a PowerShell script that is run automatically when our monitoring service detects
When I create a form (window) in PowerShell, I can usually display the form
Usually I have to set 2 different icons. One in the project's settings tab,
I have this powershell script running. The first time it runs it runs flawlessly,
Usually, before setting up a UILabel, we have to initialize CGRect like below CGRect
Usually I would have a table field called ID on auto increment. That way
Im trying to automate video conversion with powershell and ffmpeg tool. Ffmpeg have detailed
I wrote a script to remotely fetch event logs in PowerShell, but I'm not
Usually I don't have problems writing assembly and testing and debugging. But then sometimes

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.