Ps1 and PSM1

This topic contains 1 reply, has 2 voices, and was last updated by Profile photo of Dave Wyatt Dave Wyatt 1 year, 9 months ago.

  • Author
    Posts
  • #23196
    Profile photo of Hem Thapa
    Hem Thapa
    Participant

    what's the between .ps1 and psm1? please answer me as soon as possible?

  • #23197
    Profile photo of Dave Wyatt
    Dave Wyatt
    Moderator

    PS1 files are scripts, PSM1 files are script modules. You load up a module with the Import-Module command, and it has some other advantages over scripts, such as the ability to keep some code internal while exporting other commands, variables and aliases. Scripts, on the other hand, are just executed (or dot-sourced, if your intention is to load the contents of the script into your current session.)

You must be logged in to reply to this topic.