Hi,
I got an agent2 6.4.8 with same version server.
And I noticed the following.
In the agent2 conf: following parameters changed:
Timeout=15
AllowKey=system.run[powershell*]
The timeout is needed because I have a powershell command which could take up to 6 / 7 secconds. (timeout is also changed on server to make it work)
With the settings above the following works just fine
doesn't work
When i change the conf file to
AllowKey=system.run[*]
Both are working fine.
Could it be that somehow the longer command is processed are more than 1 action?
shortening the long command with smaller variable names (total command size change from 262 to 212 characters) doesn't change the result outcome
I got an agent2 6.4.8 with same version server.
And I noticed the following.
In the agent2 conf: following parameters changed:
Timeout=15
AllowKey=system.run[powershell*]
The timeout is needed because I have a powershell command which could take up to 6 / 7 secconds. (timeout is also changed on server to make it work)
With the settings above the following works just fine
Code:
system.run[powershell.exe -c "write-output (New-Object -ComObject Microsoft.Update.AutoUpdate).Results | Select-object -expandproperty LastInstallationSuccessDate"]
Code:
system.run[powershell.exe -c "$UpdateSession = New-Object -ComObject Microsoft.Update.Session ; $UpdateSearcher = $UpdateSession.CreateupdateSearcher() ; $UpdateSearcher.Search('IsHidden=0 and IsInstalled=0').Updates | Select-Object -expandproperty Title", wait]
When i change the conf file to
AllowKey=system.run[*]
Both are working fine.
Could it be that somehow the longer command is processed are more than 1 action?
shortening the long command with smaller variable names (total command size change from 262 to 212 characters) doesn't change the result outcome
Code:
system.run[powershell.exe -c "$L = New-Object -ComObject Microsoft.Update.Session ; $K = $L.CreateupdateSearcher() ; $K.Search('IsHidden=0 and IsInstalled=0').Updates | Select-Object -expandproperty Title", wait]" became not supported: Unknown metric system.run

Comment