vsteam
vsteam copied to clipboard
New-PSDrive : Exception calling "Parse" with "1" argument(s): "String was not recognized as a valid DateTime
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
Can you check if the workaround with the env variable in #455 is working for you?
Sure will test this tomorrow:
$env:VSTEAM_NO_MODULE_MESSAGES = $true
@SebastianSchuetze
Confirmed that workaround appears to work ✅
Feel free to close this if it's a duplicate.
Thanks but it's a bug that is supposed to be fixed 😬.
I have to recheck.
@brwilkinson Seems like I just fixed it with #480
I just ran into this issue and the environment variable workaround worked. Isn't this supposed to be fixed? Running VSTeam Module v7.9.0 in PowerShell 7.3.3.
@SebastianSchuetze