Closed mpiederiet closed 1 year ago
I already found out that the Import-Module fails because of this line in VSTeam.psm1
:
https://github.com/MethodsAndPractices/vsteam/blob/41f28b4d9929ed8778e2d001ec3d54d4968cb1aa/Source/VSTeam.psm1#L32
The Get-VSTeamProject
command can't be executed here because there are no stored credentials. I think it would be a good idea to check for credentials before executing Get-VSTeamProject
Maybe even better:
check for stored credentials, then check for stored default Project name, then check whether that project still exists and throw a warning if it doesn't.
Working on it now
Steps to reproduce
Set-VSTeamAccount
without using the -Level param (so it defaults to level 'Process')or (when this PowerShell window is running as Administrator)
Expected behavior
I expected that I could import the module without issues
Actual behavior?
The Import-Module failed with error message You must call Set-VSTeamAccount before calling any other functions in this module
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
Log output of $PSVersionTable