Skip to content

New-PSDrive : Exception calling "Parse" with "1" argument(s): "String was not recognized as a valid DateTime #464

@brwilkinson

Description

@brwilkinson

Steps to reproduce

New-PSDrive -Name vsts -PSProvider SHiPS -Root 'VSTeam#vsteam_lib.Provider.Account' -Description https://dev.azure.com/myproject103

module version 7.3.0 works fine.
latest module 7.6.1 has this error.

Tested in Windows Powershell and PowerShell 7,

Expected behavior

I expected that...

drive gets mapped

Name           Used (GB)     Free (GB) Provider      Root                                                                                                                                                                                                                              CurrentLocation
----           ---------     --------- --------      ----                                                                                                                                                                                                                              --------------- 
vsts                                   SHiPS         VSTeam#vsteam_lib.Provider.Account

Actual behavior?

New-PSDrive : Exception calling "Parse" with "1" argument(s): "String was not recognized as a valid DateTime

On Which OS have you tried it?

Windows

What was your server version?

Azure DevOps Services

Other server version

No response

Log output of used API

seems to throw an error  :(

 Get-VSTeamAPIVersion
_getApiVersion: C:\Program Files\WindowsPowerShell\Modules\VSTeam\7.6.1\vsteam.functions.ps1:3596
Line |
3596 |           Version                     = $(_getApiVersion Version)
     |                                                          ~~~~~~~
     | Cannot validate argument on parameter 'Service'. The argument "Version" does not belong to the set
     | "Build,Release,Core,Git,DistributedTask,DistributedTaskReleased,VariableGroups,Tfvc,Packaging,MemberEntitlementManagement,ExtensionsManagement,ServiceEndpoints,Graph,TaskGroups,Policy,Processes,HierarchyQuery,Pipelines,Billing,Wiki,WorkItemTracking" specified by the ValidateSet attribute. Supply an argument that is in the set and then try the command again.


Billing                     :
Build                       : 3.0
Core                        : 3.0
DistributedTask             : 3.0-preview
DistributedTaskReleased     :
ExtensionsManagement        : 3.0-preview
Git                         : 3.0
Graph                       :
HierarchyQuery              :
MemberEntitlementManagement :
Packaging                   : 3.0-preview
Pipelines                   :
Policy                      : 3.0
Processes                   :
Release                     : 3.0-preview
ServiceEndpoints            : 3.0-preview
TaskGroups                  : 3.0-preview
Tfvc                        : 3.0
VariableGroups              :
Version                     :
Wiki                        :
WorkItemTracking            : 3.0

Log output of $PSVersionTable

Name                           Value
----                           -----
PSVersion                      7.2.2
PSEdition                      Core
GitCommitId                    7.2.2
OS                             Microsoft Windows 10.0.22587
Platform                       Win32NT
PSCompatibleVersions           {1.0, 2.0, 3.0, 4.0…}
PSRemotingProtocolVersion      2.3
SerializationVersion           1.1.0.1
WSManStackVersion              3.0

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugwhen a bug has been identified or filed

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions