You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm trying to install Agent using DSC but getting an error. Below is the DSC definition I'm using for the local test but keep on failing with error "ConvertTo-MOFInstance : System.InvalidOperationException error processing property 'AccountCredential' OF TYPE 'xVSTSAgent': Converting and storing encrypted passwords as plain
text is not recommended. For more information on securing credentials in MOF file, please refer to MSDN blog: http://go.microsoft.com/fwlink/?LinkId=393729"
on the Azure side the error is "PowerShell DSC resource xVSTSAgent failed to execute Set-TargetResource functionality with error message: Could not find agent matching requirements."
My account that I use to login to DevOps (https://dev.azure.com/CO-Test) has MFA activated so not sure if that is the reason, it keeps on failing.
Configuration InstallVSTSAgent
{
param
(
[parameter(Mandatory = $true)]
[PSCredential]$AccountCredential
)
Import-DSCResource -ModuleName 'VSTSAgent'
xVSTSAgent VSTSAgent
{
Name = 'Agent01'
ServerUrl = 'https://dev.azure.com/CO-Test'
AccountCredential = $AccountCredential
AgentDirectory = 'C:\Agent'
Work = 'C:\VSTSAgentsWork\Agent01'
Ensure = 'Present'
}
}
# Compile the configuration file to a MOF format
InstallVSTSAgent
# Run the configuration on localhost
Start-DscConfiguration -Path .\InstallVSTSAgent -Wait -Force -Verbose```
The text was updated successfully, but these errors were encountered:
If you're leveraging Azure Automation, this documentation covers how to use their Credential Assets and how to configure support for the credentials in DSC.
Both of the above methods direct you to allow plain text passwords (safe if you run the dsc locally and safe in Azure Automation as the entire mof is encrypted at rest and in transit). There are other resources out there for how to encrypt your credentials or the mof for transit, but I'll leave that googling to the reader. =)
I'm trying to install Agent using DSC but getting an error. Below is the DSC definition I'm using for the local test but keep on failing with error "ConvertTo-MOFInstance : System.InvalidOperationException error processing property 'AccountCredential' OF TYPE 'xVSTSAgent': Converting and storing encrypted passwords as plain
text is not recommended. For more information on securing credentials in MOF file, please refer to MSDN blog: http://go.microsoft.com/fwlink/?LinkId=393729"
on the Azure side the error is "PowerShell DSC resource xVSTSAgent failed to execute Set-TargetResource functionality with error message: Could not find agent matching requirements."
My account that I use to login to DevOps (https://dev.azure.com/CO-Test) has MFA activated so not sure if that is the reason, it keeps on failing.
The text was updated successfully, but these errors were encountered: