Skip to content

Refactor: Replace Get-FileVersionInformation with DscResource.Common's Get-FileVersion #2373

@johlju

Description

@johlju

Describe the refactor

Update the codebase to use the Get-FileVersion command from the common module DscResource.Common instead of the internal/private function Get-FileVersionInformation defined in source/Private/Get-FileVersionInformation. ps1.

Steps:

  • Replace all usages of Get-FileVersionInformation with Get-FileVersion.
  • Remove the Get-FileVersionInformation function and its file (source/Private/Get-FileVersionInformation.ps1) if no longer in use.
  • Update related tests, documentation, and references.

Rationale

  • The shared DscResource.Common module provides an officially supported, reusable, and potentially better maintained version of this functionality.
  • Reduces technical debt through the consolidation of duplicate code.

Related file

Acceptance criteria

  • All usages of the old function are replaced with Get-FileVersion
  • Private function/file is removed if obsolete
  • Tests and docs are updated as needed

Metadata

Metadata

Assignees

No one assigned

    Labels

    dependenciesPull requests that update a dependency file

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions