Hi,
I am trying to enable proxy on agents using a powershell script on SCOM 2007 R2. The script is as below.
get-agent | where {$_.ProxyingEnabled -match "false"} > C:\Proxy.txt
$NoProxy = Get-Content C:\Proxy.txt
$NoProxy|foreach {$_.ProxyingEnabled =$true}
$NoProxy|foreach {$_.ApplyChanges()}
But when I execute the script , getting the below error. Please help me to know what error is this
Property 'ProxyingEnabled' cannot be found on this object; make sure it exists and is settable.
At line:1 char:22
+ $NoProxy|foreach {$_. <<<< ProxyingEnabled =$true}
+ CategoryInfo : InvalidOperation: (:) [], RuntimeException
+ FullyQualifiedErrorId : PropertyAssignmentException
BR,
Krish