It is currently 23 Jul 2017 2:40


Post new topic  Reply to topic  [ 2 posts ] 
Author Message
PostPosted: 06 Aug 2014 7:41 
Offline
Nouveau
Nouveau
User avatar

Joined: 08 Dec 2008 9:00
Posts: 14
Location: Texas
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?


Top
   
PostPosted: 12 Aug 2014 12:27 
Offline
Nouveau
Nouveau
User avatar

Joined: 08 Dec 2008 9:00
Posts: 14
Location: Texas
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


Top
   
Display posts from previous:  Sort by  
Post new topic  Reply to topic  [ 2 posts ] 

All times are UTC+10:00


Who is online

Users browsing this forum: No registered users and 2 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Limited
The site created by Franck YOT. Images, logo, content and trademarks about Control-M products are property of BMC Software.
All the comments are property of their posters. Images, logo, content and design are © copyright by Scheduler-Usage.com. All Rights Reserved