web
You’re offline. This is a read only version of the page.
close
Skip to main content
Community site session details

Community site session details

Session Id :
Dynamics 365 Community / Blogs / DaxGeek / View a List of Reports in P...

View a List of Reports in PowerShell

Hossein.K Profile Picture Hossein.K 6,648
Complete the following procedure to open PowerShell, load the Microsoft Dynamics AX PowerShell module, and view a list of reports.

1. Open PowerShell as an administrator by completing the following steps:


a. Open the PowerShell folder on the
Start menu (Start > All Programs > Accessories > Windows PowerShell).

b. Right-click the
Windows PowerShell option.

c. Click
Run as administrator.

2. Enter the following command to enable PowerShell to run scripts:


"
Set-ExecutionPolicy Unrestricted", and then press Enter.

3. Confirm the previous command by entering
Y.

4. Load the Microsoft Dynamics AX PowerShell module by entering the following command:



1
2
3
4
5
6
7
8
$axmodulename ="Microsoft.Dynamics.AX.Framework.Management"
$axdllname = $axmodulename + ".dll"
$gacfolder = join-path $env:windir "assembly\GAC_MSIL"
$axdll = Get-ChildItem $gacfolder -Recurse -Include *.dll -
Name $axdllname
$axdll = join-path $gacfolder $axdll
write-host "Importing AX ManaSalesgement module"
import-module $axdll

TIP: It is recommend that you save this command as a script file so that you do
not have to type this command every time that you want to load the Microsoft
Dynamics AX PowerShell module. To run the script file, enter the full path of the file.


5. Enter the following command to view the list of cmdlets that are
available for use: "
Get-Command -Module
Microsoft.Dynamics.AX.Framework.Management
", and then press Enter.

6. Retrieve information about the default reports and enter the
following command to store that information in a local variable:
"
$reports = Get-AXReport -ReportName *", and then press Enter.

7. Enter the following command to view the list of reports: "
$reports"
and then press
Enter.

The list contains hundreds of reports. To deploy all the reports, refer to
Procedure: Deploy Reports. To filter the list and deploy a smaller set of reports,
refer to Procedure: Filter the list of reports.


Regards,
Hossein Karimi

Comments

*This post is locked for comments