none
HLK automation error: GetRootMachinePool() cannot find Root Machine Pool "$" RRS feed

  • Question

  • This is my code in PowerShell

    ===========

    $DebugPreference = "Continue";

    $ObjectModel = [Reflection.Assembly]::LoadFrom($env:WTTSTDIO + "Microsoft.Windows.Kits.Hardware.objectmodel.dll")
    $ObjModel_DbConnection  = [Reflection.Assembly]::LoadFrom($env:WTTSTDIO + "Microsoft.Windows.Kits.Hardware.objectmodel.dbconnection.dll")
    $ObjModel_Submission    = [Reflection.Assembly]::LoadFrom($env:WTTSTDIO + "Microsoft.Windows.Kits.Hardware.objectmodel.submission.dll")


    $connectFileName = $env:WTTSTDIO + "connect.xml"
    $connectFile = [xml](Get-Content $connectFileName)

    $ControllerName = $connectFile.Connection.GetAttribute("Server")
    $DatabaseName = $connectFile.Connection.GetAttribute("Source")

    $Manager = new-object -typename Microsoft.Windows.Kits.Hardware.ObjectModel.DBConnection.DatabaseProjectManager -Args $ControllerName, $DatabaseName 

    $root = $Manager.GetRootMachinePool()

    =================

    I keep getting this error. Does anyone knows how can I solve this problem?

    Exception calling "GetRootMachinePool" with "0" argument(s): "Could not find a machine pool with the name: $"
    At C:\Temp\HLKAutomation.ps1:16 char:1
    + $Manager.GetRootMachinePool()
    + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
        + CategoryInfo          : NotSpecified: (:) [], MethodInvocationException
        + FullyQualifiedErrorId : MachineException
     

    Wednesday, July 19, 2017 7:32 PM