{"action":"closed","issue":{"url":"https://api.github.com/repos/Microsoft/vsts-tasks/issues/1677","repository_url":"https://api.github.com/repos/Microsoft/vsts-tasks","labels_url":"https://api.github.com/repos/Microsoft/vsts-tasks/issues/1677/labels{/name}","comments_url":"https://api.github.com/repos/Microsoft/vsts-tasks/issues/1677/comments","events_url":"https://api.github.com/repos/Microsoft/vsts-tasks/issues/1677/events","html_url":"https://github.com/Microsoft/vsts-tasks/issues/1677","id":153885519,"number":1677,"title":"`##vso[task.setvariable]` does not work as expected if `issecret=true`","user":{"login":"icnocop","id":507649,"avatar_url":"https://avatars.githubusercontent.com/u/507649?v=3","gravatar_id":"","url":"https://api.github.com/users/icnocop","html_url":"https://github.com/icnocop","followers_url":"https://api.github.com/users/icnocop/followers","following_url":"https://api.github.com/users/icnocop/following{/other_user}","gists_url":"https://api.github.com/users/icnocop/gists{/gist_id}","starred_url":"https://api.github.com/users/icnocop/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/icnocop/subscriptions","organizations_url":"https://api.github.com/users/icnocop/orgs","repos_url":"https://api.github.com/users/icnocop/repos","events_url":"https://api.github.com/users/icnocop/events{/privacy}","received_events_url":"https://api.github.com/users/icnocop/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2016-05-09T22:36:17Z","updated_at":"2016-05-10T15:34:54Z","closed_at":"2016-05-10T15:34:54Z","body":"According to https://github.com/Microsoft/vsts-tasks/blob/master/docs/authoring/commands.md, I should be able to call `Write-Host (\"##vso[task.setvariable variable=testvar;issecret=true;]testvalue\")` in a Powershell build step and then call `Write-Host \"testvar: $Env:testvar\"` in a subsequent Powershell build step, but it doesn't seem like the variable was saved because the output is just `testvar: ` when I was expecting `testvar: ********`.\r\n\r\nIf I remove `issecret=true;`, it works as expected, but the value is not masked in the output.\r\n\r\nThank you."}}