Feb 01 2022 01:55 PM
Hi all.
Sorry for the translation.
I have a problem with a script (which was already working), I can't get my data, the script is used to reach Azure development services and returns an array, which I then save to a JSON file but for a few weeks I have to work.
No change was made and as soon as the authentication is already valid.
Separately there is no issue, the problem is in the matrix, I attach a piece of code.
$Capacities += New-Object -TypeName PSObject -Property {
ProjectName=$project.name
TeamName=$team.name
SprintName=$sprintteam.name
SprintStartDate="{0:yyyy-MM-dd}"-f $startDate
S
}
}
$Capacities | ConvertTo-Json | Out-File -FilePath "$home\desktop\Capacities.json"
Feb 01 2022 03:40 PM
Feb 02 2022 01:08 AM
Feb 02 2022 01:20 AM
This adapted sample
$Capacities += [PSCustomObject]@{
ProjectName = 'project' #$project.name
TeamName = 'team' #$team.name
SprintName = 'sprint' #$sprintteam.name
SprintStartDate = "{0:yyyy-MM-dd}"-f $startDate
}
$Capacities | ConvertTo-Json | Out-File -FilePath "$home\desktop\Capacities.json"
get-content "$home\desktop\Capacities.json"
gives this result
{
"ProjectName": "project",
"TeamName": "team",
"SprintName": "sprint",
"SprintStartDate": ""
}