- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - Microsoft
- >
- Re: Running Powershell from within Bat file inside...
Operating System - Microsoft
1821051
Members
2855
Online
109631
Solutions
Forums
Categories
Company
Local Language
back
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Discussions
Discussions
Discussions
Forums
Discussions
back
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Blogs
Information
Community
Resources
Community Language
Language
Forums
Blogs
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-19-2010 05:00 AM
10-19-2010 05:00 AM
Running Powershell from within Bat file inside Process policy
Hello,
I'm hoping someone out there can think of a better way to accomplish our goal. Here's what we are trying to do:
- check to see if process is running
- if it isn't, run stored procedure to see if it is the time of day when it should be running
- if value returned to MT policy indicates it should be running, then execute command to start it up
This is all working when we hardcode server name on which to run stored procedure. Here's the complication:
- Process is running on store DC server
- Stored procedure is located on store unix server and we have over 100 stores. We need to parse out store number from DC server name and pass it in as unix server name. A batch file was created to do this, but it doesn't seem to be executing powershell correctly.
- The powershell command to run the stored procedure works correctly when executed from automatic command, but it doesn't work from within the batch file.
Any ideas? Not sure if I explained this clearly enough, so feel free to come back with questions.
Thank you,
Bev
I'm hoping someone out there can think of a better way to accomplish our goal. Here's what we are trying to do:
- check to see if process is running
- if it isn't, run stored procedure to see if it is the time of day when it should be running
- if value returned to MT policy indicates it should be running, then execute command to start it up
This is all working when we hardcode server name on which to run stored procedure. Here's the complication:
- Process is running on store DC server
- Stored procedure is located on store unix server and we have over 100 stores. We need to parse out store number from DC server name and pass it in as unix server name. A batch file was created to do this, but it doesn't seem to be executing powershell correctly.
- The powershell command to run the stored procedure works correctly when executed from automatic command, but it doesn't work from within the batch file.
Any ideas? Not sure if I explained this clearly enough, so feel free to come back with questions.
Thank you,
Bev
1 REPLY 1
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-20-2010 07:26 AM
10-20-2010 07:26 AM
Re: Running Powershell from within Bat file inside Process policy
The opinions expressed above are the personal opinions of the authors, not of Hewlett Packard Enterprise. By using this site, you accept the Terms of Use and Rules of Participation.
Company
Learn About
News and Events
Support
© Copyright 2025 Hewlett Packard Enterprise Development LP