Search This Blog

Wednesday, January 25, 2012

Ax2012 Power shell scripts for SSRS usage

Power shell script for reports in AX2012
we can use power shell scripts to deploy the reports to server
Open the administrative tools->Right click on MS Dynamics AX 2012 management shell and select run as admin.
Now it will opens the Powershell script to run the commands.
I will provide some sample scripts for SSRS

To get the List of reports, It will load all the reports into the reports label.
$reports=get-AXReport -ReportName *

To view the reports list
$reports

To Filter the reports list we can write the query on the object as following.
$reports | select-object name | where {$_.name -like "inventTrans*"}

To publish the reports,
publish-AXReport -reportname InventTransList
If we want to publish multiple reports just add another report after that with the seperator ,

To publish all the reports which skips admin check
publish-AXReport -reportName * -skipreportserveradminCheck


4 comments:

  1. Hi, I need to update my 2000 existing Items "Unit price" and "color" by using excel can u please give me an idea. I am able to import new records with updated unit price and color but updating the existing records is a problematic.

    ReplyDelete
    Replies
    1. Sry to say I am talking the previous post about AX2012 and Excel 2010

      Delete
    2. I think you can use Excel Addin for importing and updating the data...

      Delete
  2. how to point the management shell to other AOS?
    because I have 2 AOS and my power shell always points to the first AOS.

    ReplyDelete

Thanks for visiting my blog,
I will reply for your comment within 48 hours.

Thanks,
krishna.