best way to work with versioning

Welcome Forums General PowerShell Q&A best way to work with versioning

  • This topic has 1 reply, 2 voices, and was last updated 3 weeks ago by
    Participant
    .
Viewing 1 reply thread
  • Author
    Posts
    • #227530
      Participant
      Topics: 30
      Replies: 74
      Points: 402
      Rank: Contributor

      Hi,
      the situation is as follows :
      several powershell scripts that I need are stored to a fileshare in a specific folder
      these Powershell scripts are used on 6 different Ad servers to which this fileshare is linked.
      when someone is launching the powershell script I want the script to check on the fileshare if the most recent powershell script for this specific task is used.

      I’ve seen that you can use New-scriptFileInfo but then I would like to know on how to check if I use the most recent version or something like

      get-item “C:\temp\checks.ps1” |Format-List -Property *version*
      
      

      output of the last is

      VersionInfo : File: C:\temp\checks.ps1
      InternalName:
      OriginalFilename:
      FileVersion:
      FileDescription:
      Product:
      ProductVersion:
      Debug: False
      Patched: False
      PreRelease: False
      PrivateBuild: False
      SpecialBuild: False
      Language:
      

      where I’m wondering how do I get the fileversion filled in.

      thanks for your suggestions in this matter

    • #227536
      Participant
      Topics: 4
      Replies: 2248
      Points: 5,490
      Helping Hand
      Rank: Community MVP

      Did you read the help for New-ScriptFileInfo completely? Example #2 actually explains it. 😉 If you existing scripts do not have the metadata yet you’d need to add them first before you can check for them.

Viewing 1 reply thread
  • You must be logged in to reply to this topic.