Giter Club home page Giter Club logo

Comments (4)

eissko avatar eissko commented on May 18, 2024

And this is an error from eventvwr.msc:
Job {73390701-015C-11EA-A80E-000D3AA83F09} :
This event indicates that a non-terminating error was thrown when DSCEngine was executing Test-TargetResource on xVSTSAgent DSC resource. FullyQualifiedErrorId is NamedParameterNotFound,Microsoft.PowerShell.Commands.GetChildItemCommand. Error Message is A parameter cannot be found that matches parameter name 'Attributes'..

from vstsagent.powershell.

eissko avatar eissko commented on May 18, 2024

The error is comming from function Get-VstsAgent - line 430

Get-ChildItem "$AgentDirectory**.agent" -Attributes '!D+H,!D' -ErrorAction SilentlyContinue | ...

from vstsagent.powershell.

jwittner avatar jwittner commented on May 18, 2024

Very strange, Get-ChildItem definitely has the Attributes parameter. Even as far back as Version 3.0 of PowerShell. Can I ask what versions of PowerShell you're using, and what your $AgentDirectory is?

from vstsagent.powershell.

eissko avatar eissko commented on May 18, 2024

I know - that's very strange issue. I would like to put emphasis again on the fact that only 1st cycle of DSC fails. 2nd one is allright. Here below is snippet from DSC configuration - creating volume, the folder and then installing agents in the loop. DependsON should keep the correct flow.

Powershell 5.1 is used

    xDisk CreateDiskVolume
    {
        DiskId = 2
        DriveLetter = "F:"
        DiskIdType = "number"
        FSFormat = "NTFS"
        FSLabel = "agents"
    }

    File CreateFolder {
        Type = 'Directory'
        DestinationPath = 'F:\VSTSAgents\'
        Ensure = "Present"
        DependsOn = "[xDisk]CreateDiskVolume"
    }

    $i=1
    for($i;$i -le $agentCount; $i++){    

            xVSTSAgent "xVSTSAgent $i" {
                Name               = ("{0}{1}" -f "Agent", $i)
                Pool               = $agentPoolName
                ServerUrl          = $ServerUrl
                AccountCredential  = $accountCredential
                AgentDirectory     = "F:\VSTSAgents\"
                Ensure             = "Present"
                PrefixComputerName = $True
                DependsOn          = "[File]CreateFolder"
            }
    }   

from vstsagent.powershell.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.