Показать сообщение отдельно
Старый 29.01.2011, 14:12   #1  
Blog bot is offline
Blog bot
Участник
 
25,475 / 846 (79) +++++++
Регистрация: 28.10.2006
daxdilip: Dynamics AX 2009 Integration with PowerShell to unzip files
Источник: http://daxdilip.blogspot.com/2011/01...tion-with.html
==============

Had a requirement to unzip files from AX for one of our interfaces. I didn't want to install any third party software on our server as the security policy prevents it.

Tried using Microsoft.Deployment Framework within AX (http://www.eggheadcafe.com/software/...eployment.aspx), but ran into issues using the framework to unzip files.


Solution
Since, our AOS Servers run on Windows Server 2008 and Powershell is something which comes default with this edition of windows, I thought why not leverage it as it has a powerful scripting engine and I can see it as a predecessor to VB Scripting.

Following code snippet, is the powershell script which I wrote to unzip the files.







And, here is the X++ code which calls the script






I remembered my Unix scripting and vi editor days when working on Powershell editor.


Also, this is a very useful reference if you are graduating from VBScript to Powershell
http://technet.microsoft.com/en-us/l.../ee692947.aspx


Some other useful links on Powershell from Axaptapedia and Brandon's blog
http://www.axaptapedia.com/PowerShell
http://dynamics-ax.blogspot.com/2010...owershell.html


Happy Powershelling with DAx!




Источник: http://daxdilip.blogspot.com/2011/01...tion-with.html
__________________
Расскажите о новых и интересных блогах по Microsoft Dynamics, напишите личное сообщение администратору.