PWPS_DAB Version Check

I am using this to check the version of PWPS_DAB before running a script.  Is there a better way to do this?

$LocalDabModuleVersion = Get-Module -Name PWPS_DAB -ListAvailable
$LocalVersionString = $LocalDabModuleVersion.Version.ToString().Replace(".","")

If($LocalVersionString -lt "12110")
    Write-Host "PWPS_DAB or newer required to run this script." -ForegroundColor Cyan
    Write-Host "PWPS_DAB" $LocalDabModuleVersion.Version "found. Script will run." -ForegroundColor Cyan

I can see potential issues with this method.  For example, when PWPS_DAB is released.


Parents Reply Children
No Data