none
[WHQL automation] HCK new-object databaseprojectmanager fails "specified cast is not valid" RRS feed

  • Question

  • I'm trying to automate both the HLK and HCK, I have a script that works for the HLK, but when I try to  run it on the HCK I get the error "new-object exception calling .ctor with 2 arguments: "specified cast is not valid"" while trying to run the script, I changed the database name, even tried removing it and it kept failing. This is the line it's failing on:

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

    I'm running this in powershell, btw. Any ideas?

    Monday, December 5, 2016 4:30 PM

All replies

  • So, still not sure what the actual problem was, probably some sql wierdness. I just tried this on a 2008 R2 HCK Controller it worked, the one I saw the failure on was 2012 HCK. 
    Monday, December 5, 2016 4:39 PM