joel74 / POSH-LTM-Rest

PowerShell module and scripts for working with F5's LTM REST API
MIT License
78 stars 49 forks source link

Unable to run New-F5Session in PS < 6.0 #217

Closed boz987 closed 2 years ago

boz987 commented 2 years ago

Unable to find type [System.Management.Automation.SemanticVersion]. At C:\Program Files\WindowsPowerShell\Modules\F5-LTM\1.4.313\Public\New-F5Session.ps1:22 char:40

https://docs.microsoft.com/en-us/dotnet/api/system.management.automation.ivalidatesetvaluesgenerator?view=pscore-6.0.0

Server 2022 still comes with Powershell 5.1 as default.

joel74 commented 2 years ago

Thanks. I will take a look. Since I still claim the module supports PowerShell v3+, I shouldn't be using a class that's only is 6 and up.

joel74 commented 2 years ago

Fixed with this commit. Thanks for catching this. https://github.com/joel74/POSH-LTM-Rest/commit/98303b1538d6e813e12f130b87cdd7eaf31fb8a0