Author Topic: [CCPulse+] Save the agent group name to a variable in Threshold.Action  (Read 702 times)

This topic contains a post which is marked as Best Answer. Press here if you would like to see it.

Offline eisefr

  • Newbie
  • *
  • Posts: 4
  • Karma: 0
Hiiii..

I would like to save the agent-group - name into a variable.

My action script .. very simple:
Code: [Select]
Parameter = "BRS_CLS"
Aktion = "zero"
Dim ObjShell
Set ObjShell= CreateObject("WScript.Shell")
ObjShell.Run "C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe c:\anwend\Skripte\Agentengruppen_ungleich_1.ps1 " & Parameter + " " + Aktion

I would like to add a row like
Code: [Select]
Group = Agentgroupname

I would like to pass this variable "Group" to a powershell skript.


Is this possible somehow ?

« Last Edit: May 04, 2022, 06:50:44 PM by eisefr »

Offline hsujdik

  • Sr. Member
  • ****
  • Posts: 483
  • Karma: 17
Re: Save the agent group name to a variable in Threshold.Action
« Reply #1 on: April 12, 2022, 11:04:04 PM »
I'm assuming you are talking about CCPulse+ here.


Have you tried something like this?
Code: [Select]
Dim AgentGroupName = Threshold.CFGObjectID

Offline eisefr

  • Newbie
  • *
  • Posts: 4
  • Karma: 0
Re: Save the agent group name to a variable in Threshold.Action
« Reply #2 on: May 04, 2022, 06:48:00 PM »
I get an error when I try this.

Quote
Error at
Line: 1
Position: 20
Error Message: Expected end of statement

Maybe it's just something simple.
I am very new to this.

Offline cavagnaro

  • Administrator
  • Hero Member
  • *****
  • Posts: 7526
  • Karma: 56330
Post your whole code pls

Enviado de meu SM-N9600 usando o Tapatalk


Offline eisefr

  • Newbie
  • *
  • Posts: 4
  • Karma: 0
Parameter = "KSC_Test"
Aktion = "zero"
Dim ObjShell
Set ObjShell= CreateObject("WScript.Shell")
Dim AgentGroupName = Threshold.CFGObjectID
ObjShell.Run "C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe c:\anwend\Skripte\Agentengruppen_ungleich_1.ps1 " & Parameter + " " + Aktion

If row#5 would work, I could replace Parameter with AgentGroupName

Marked as best answer by eisefr on May 14, 2022, 10:28:40 AM

Offline eisefr

  • Newbie
  • *
  • Posts: 4
  • Karma: 0
I got it to work now.
This is how it works here:


Quote
Dim thresholdInfo
Parameter = CStr(Threshold.CFGObjectID)

Aktion = "Anmeldung"
Dim ObjShell
Set ObjShell= CreateObject("WScript.Shell")
ObjShell.Run "C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe c:\anwend\Skripte\Agentengruppen.ps1 " & Parameter + " " + Aktion

Thank you all for your time and help.

Offline cavagnaro

  • Administrator
  • Hero Member
  • *****
  • Posts: 7526
  • Karma: 56330
Thanks for sharing the solution

Enviado de meu SM-N9600 usando o Tapatalk