Enable Agent Proxying, by Health Service Id


Enable Agent Proxying, by Health Service Id

$a=get-agent | where {$_.hostedHealthService.id -eq "guid"};$a.set_proxyingEnabled($true);$a.applyChanges()

main menu


Comments (2)

  1. Anonymous says:

    UPDATED PAGE ON 03-19-2009 If you have visited my Command Shell blog page before, I have posted notice

  2. DSloyer says:

    I had issues with this script:

    >$a=get-agent | where {$_.hostedHealthService.id -eq "f741b401-0000-0000-0000-000000000000"};$a.set_proxyingEnabled($true);$a.applyChanges()

    You cannot call a method on a null-valued expression.

    At line:1 char:115

    + $a=get-agent | where {$_.hostedHealthService.id -eq "f741b401-0000-0000-0000-000000000000"};$a.set_proxyingEnabled <<<< ($true);$a.applyC

    hanges()

       + CategoryInfo          : InvalidOperation: (set_proxyingEnabled:String) [], RuntimeException

       + FullyQualifiedErrorId : InvokeMethodOnNull

    You cannot call a method on a null-valued expression.

    At line:1 char:138

    + $a=get-agent | where {$_.hostedHealthService.id -eq "f741b401-0000-0000-0000-000000000000"};$a.set_proxyingEnabled($true);$a.applyChanges

    <<<< ()

       + CategoryInfo          : InvalidOperation: (applyChanges:String) [], RuntimeException

       + FullyQualifiedErrorId : InvokeMethodOnNull