Send shout to a powershell script.

Everything about Control-M Server installation or setup.
Post Reply
User avatar
meshearer
Nouveau
Nouveau
Posts: 14
Joined: 08 Dec 2008 12:00
Location: Texas
Contact:

Send shout to a powershell script.

Post by meshearer » 05 Aug 2014 11:41

Does anyone have experience with defining a shout destination as a powershell script? We are currently upgrading to version 8 and migrating the server from Solaris to Windows. I have custom KORN shell scripts on my server that execute when a job sends a shout to the corresponding entry defined in the shout table. I have converted the current shell scripts to powershell and can exectute them from the command line but when a job shouts to it I get the "shout to destination xxxxx failed" in the log. Any thoughts?

User avatar
meshearer
Nouveau
Nouveau
Posts: 14
Joined: 08 Dec 2008 12:00
Location: Texas
Contact:

Re: Send shout to a powershell script.

Post by meshearer » 11 Aug 2014 4:27

I have resolved the issue. I am posting the steps I had to take to get the shouts to the powershell script to work:

1. Set the value of shout destination in the shout table as follows:

[tab=30]powershell C:\<location of script>\<script name>.ps1

2. Account for the sending of the "HostID" and "Urgency" in the shout to the program:

[tab=30]Param(
[tab=35][Parameter(Position=0,Mandatory=$false)][string]$ServerName,
[tab=35][Parameter(Position=1,Mandatory=$true)][int]$FailLimit,
[tab=35][Parameter(Position=2,Mandatory=$True)][int]$RunCount,
[tab=35][Parameter(Position=3,Mandatory=$True)][string]$OrderId,
[tab=35][Parameter(Position=4,Mandatory=$True)][string]$ShoutDest,
[tab=35][Parameter(Position=5,Mandatory=$True)][string]$JobApp,
[tab=35][Parameter(Position=6,Mandatory=$True)][string]$JobName,
[tab=35][Parameter(Position=7,Mandatory=$True)][string]$JobSubApp,
[tab=35][Parameter(Position=8,Mandatory=$false)][string]$Urgency
[tab=30])

I hope this helps others who may have to send a shout to execute a powershell program.

Mike

Post Reply