Skip to content

Minimum PowerShell Version? #3

Description

@COV-Steve

The requirements for this module indicate a minimum PowerShell version of 5.1. However, in a 5.1 environment, when running Get-FolioRecordsByQuery I get the error:

Get-Date : A parameter cannot be found that matches parameter name 'AsUTC'.
At <redacted>\Modules\FolioClient\0.0.3\FolioClient.psm1:165 char:24
+         if (((Get-Date -AsUTC) -ge $this.TokenExpiry) -or ($force)) {
+                        ~~~~~~
    + CategoryInfo          : InvalidArgument: (:) [Get-Date], ParameterBindingException
    + FullyQualifiedErrorId : NamedParameterNotFound,Microsoft.PowerShell.Commands.GetDateCommand

It appears that the -AsUTC parameter didn't exist until version 7.4: https://learn.microsoft.com/en-us/dotnet/api/microsoft.powershell.commands.getdatecommand.asutc?view=powershellsdk-7.6.0

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions