what is the best practice for updating custom powershell modules

Welcome Forums General PowerShell Q&A what is the best practice for updating custom powershell modules

This topic contains 2 replies, has 2 voices, and was last updated by

 
Participant
3 years, 3 months ago.

  • Author
    Posts
  • #28125

    Participant
    Points: 0
    Rank: Member

    Hi All,

    I just started creating my custom modules that I'm planning to deploy.

    What is your best custom practice for getting the latest code?

    I was thinking along the lines of getting the the hash of the master file and if it does't match my copy, to update it

    Any suggestions?

    Thanks,

  • #28126

    Keymaster
    Points: 1,638
    Helping HandTeam Member
    Rank: Community Hero

    You're meant to provide a manifest that includes a version. That way you can simply check the version, and even have scripts define a specific version dependency, if desired. Ideally, you'd have your module in a repo that PowerShellGet can access, so you can easily check the repo version and update if needed.

    However, checking a file hash is an approach that would probably work.

  • #28128

    Participant
    Points: 0
    Rank: Member

    Don, i'll start looking at the manifest option.

    Thanks.

The topic ‘what is the best practice for updating custom powershell modules’ is closed to new replies.