views:

150

answers:

1

My attempts to add a(ny) PowerShell script as a BizTalk 2009 PreProcessingScript oder PostProcessingScript (Application -> Resources -> Add) are always met with an error message


Validation failed for 1 resource(s).

Cannot add an unsupported script type (extension = ".PS1"). Verify the source location "c:\somescripts\BtsDumpEnvironment.ps1". (Microsoft.BizTalk.ApplicationDeployment.Engine)


This is despite the fact that .PS1 is an extension on the machine-global environment variable, i.e. (PowerShell)

[Environment]::GetEnvironmentVariable("PATHEXT", "Machine")

returns

.COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH;.MSC;.PS1

after a reboot of the box (i.e. every single service out there now knows about .PS1).

How can I use PowerShell scripts in BizTalk deployment task in a straight-forward manner (i.e. I'd rather call the script right away, not through a VBS layer invoking the PowerShell script which is included as a file resource)

A: 

Could you enbed your call to the powershell script in a bat file and call the bat file as a pre processing command?

I know it a work around and not the answer. But I had to do the same thing for our CI server.

Hope it helps.

Chris Jones
The wrapping / layering option is indeed feasible (I'd go the .VBS route because IMHO that's the lesser evil), but something that I would rather want to avoid.
daffy