ASG
IBM
Zystems
Cressida
Icon
Netflexity
 
  MQSeries.net
Search  Search       Tech Exchange      Education      Certifications      Library      Info Center      SupportPacs      LinkedIn  Search  Search                                                                   FAQ  FAQ   Usergroups  Usergroups
 
Register  ::  Log in Log in to check your private messages
 
RSS Feed - WebSphere MQ Support RSS Feed - Message Broker Support

MQSeries.net Forum Index » WebSphere Message Broker (ACE) Support » How to call mqsi commands from a Powershell script

Post new topic  Reply to topic
 How to call mqsi commands from a Powershell script « View previous topic :: View next topic » 
Author Message
Bichu
PostPosted: Tue Jan 29, 2019 9:56 pm    Post subject: How to call mqsi commands from a Powershell script Reply with quote

Centurion

Joined: 16 Oct 2011
Posts: 124
Location: London

Hello All,

Im trying to set up a CICD job on GitLab which inturn calls a powershell script to download few files and build a bar file accordingly. I am stcuk on the last step where I couldnt build the bar files from a powershell script. When I run mqsiprofile, I can see the output as successful. But the following commands mqsicreatebar or mqsilist fails with the below error messages
Code:


PS C:\Program Files\IBM\IIB\10.0.0.14\server\bin> .\mqsiprofile.cmd
.\mqsilist.exe

MQSI 10.0.0.14
C:\Program Files\IBM\IIB\10.0.0.14\server

The user environment was not adequately prepared to continue execution. Locate and run the profile supplied with the product. This file is called mqsipr
ofile, and is located in the bin subdirectory for the product.
 


May I know what am I missing. Please help.
Back to top
View user's profile Send private message
fjb_saper
PostPosted: Wed Jan 30, 2019 10:54 am    Post subject: Reply with quote

Grand High Poobah

Joined: 18 Nov 2003
Posts: 20696
Location: LI,NY

Powershell doesn't retain the environment as called from the (DOS) command line. To achieve what you want to do, you need to call a batch file that in turn sources the profile and executes the other steps...

Working as designed...
_________________
MQ & Broker admin
Back to top
View user's profile Send private message Send e-mail
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » WebSphere Message Broker (ACE) Support » How to call mqsi commands from a Powershell script
Jump to:  



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 vote in polls in this forum
Protected by Anti-Spam ACP
 
 


Theme by Dustin Baccetti
Powered by phpBB © 2001, 2002 phpBB Group

Copyright © MQSeries.net. All rights reserved.