none
[powshell remotely execution]How to Run WHQL job via powershell api on the host which is not HCK Controller RRS feed

  • Question

  • Hi, 

    I write a scripts to automate HCK whql runs , ,the scripts works fine on the host which is the HCKController/HCK Studio. 

    They I want to run this job on another windows guests which only has HCK studio . but it failed w/  "failed to connect to the database "

    Anything I need to do to make me execute powershell scripts remotely successfully?

    Scripts to connect HCK studio:

    rite-Host "Usage: %SystemRoot%\syswow64\WindowsPowerShell\v1.0\powershell.exe -file TargetFamily.ps1 <<ControllerMachineName>> "
    
    $ControllerName = $args[0]
    if ($ControllerName -eq $null -OR $ControllerName -eq "")
    {
        write-host "Need to supply the controller Name as a parameter to this script"
        return
    }
    else
    {
        write-host connecting to the controller $ControllerName
    }
    
    
    # connect to the controller
    $Manager = new-object -typename Microsoft.Windows.Kits.Hardware.ObjectModel.DBConnection.DatabaseProjectManager -Args $ControllerName, DTMJobs
    


    Best Regards, Mike

    • Moved by HLK ModeratorModerator Wednesday, October 3, 2012 7:06 PM WLK/WHCK related (From:Windows Hardware WDK and Driver Development)
    Wednesday, August 29, 2012 10:08 AM

All replies

  • Hello Mike

    You can schedule jobs using HCK Studio from the machine on which controller [ Database ] is installed.

    We cant schedule job on a hostname machine which has HCK studio installed but no controller on the machine.

    Thanks

    Wintestlogo Team


    Wintest Consultancy and Services Email:help@wintestlogo.com This posting is provided "AS IS" with no warranties, and confers no rights.

    Wednesday, August 29, 2012 4:41 PM
  • Hello Wintestlogo

    I know that "You can schedule jobs using HCK Studio from the machine on which controller [ Database ] is installed." , But What I want is to use HCK API to execute WHQL jobs automately ,

    Suppose  I have 2 HCK Controllers  host A and host B, I write the powershell on Host A ,but I want to execute the scripts on Host A and the jobs on Host B could run , Does HCK provides API for such kind of request ?

    THanks,s


    Best Regards, Mike

    Wednesday, August 29, 2012 5:11 PM
  • Let's start with a few basic question so I understand you configuration -

    Are you running the script with the same (log on) credentials as the (host) controller?

    Is the guest machine configured like the host in terms of workgroup/domain? That is, if the host is workgroup, then the guest must be workgroup. Same with domain. In short, can't mix workgroup and domain machines.

    Can you install studio on the guest machine and connect via studio?


    John -- This posting is provided "AS IS" with no warranties, and confers no rights.

    Wednesday, August 29, 2012 7:40 PM
  • Hi, John

    I have 2 HCK environemnt ,one is in DC ,another one is in workgroup  ,. here is my scripts to run WHQL  . jobs https://github.com/vipmike007/whql_powershell/blob/fb0321383a475e7e33991aaec496062c690423f2/WHQL_Test.ps1 which I put it in workgroup Domain Contorller host 

    Every time I execute this scripts on workgroup  to make the hck jobs running on the same workgroup hck controller host : # powershell WHQL_Test.ps1 <workgroup machine name > <driver name > <driver version > it can work successfully

    then I want to execute this scripts on workgroup to make the hck jobs running on Domain HCK environment  .I tried  # powershell WHQL_Test.ps1 <Domain Controller machine name/ip > <driver name > <driver version >  if failed and prompts ""failed to connect to the database "  , 

    What can I do to make the scripts works to execute whql job remotely ?


    Best Regards, Mike

    Thursday, August 30, 2012 2:10 AM