Quantcast
Channel: VMware Communities : All Content - All Communities
Viewing all articles
Browse latest Browse all 207710

Run powershell script via batch redirect script not working after upgrade.

$
0
0

I have a problem running redirect batch script after upgrade to vsphere 5. Before upgrade (v.4u1) it worked fine.

I have a powershell script who is triggered on an alarm event via redirect script.

 

snip from redirect script

.

.

set POWERSHELL=C:\WINDOWS\system32\windowspowershell\v1.0\powershell.exe -nologo -noprofile -noninteractive

start %POWERSHELL% -command "&"%1""

.

.

 

Action run a command "c:\foo\redirect.bat" "c:\bar\script.ps1" in alarm settings.

I know the vcenter is running the redirect script but the powershell script isn't called. If I however remove the batch "start" command the powershell script runs?

.

.

set POWERSHELL=C:\WINDOWS\system32\windowspowershell\v1.0\powershell.exe -nologo -noprofile -noninteractive

%POWERSHELL% -command "&"%1""

.

.

 

This was not a problem before the upgrade. Anyone have a suggestion which might solve this problem? (I need the powershell script to run in another session)

 

//Micke


Viewing all articles
Browse latest Browse all 207710

Latest Images

Trending Articles



Latest Images

<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>