RSS

Tag Archives: powershell

How to create Azure Service Bus for AX Mobile Connector

Issue

In order to connect to AX using mobile apps, one way or another you will end up create service bus on Azure. You will need the ability to access ACS Management Portal. However, if a service bus is created directly in Azure portal, ACS  management portal will not be enabled.  See examples below

A service bus was created in Azure portal. It is missing ACS

image

A service bus was created using PowerShell

image

image

Solution

Create the service bus should not be done via Azure portal anymore, it must done via PowerShell commands

Step 1: Azure PowerShell CmdLets

Go to the Azure Downloads page and click the link to install the Azure PowerShell cmdlets.

clip_image001

This will launch the Web Platform Installer.  Click the Install button in the Web Platform Installer to install the cmdlets.

Step 2:  PowerShell Commands

1> Run the command “Add-AzureAccount” and provide Live ID user name/password to connect to a default Azure subscription.

image

2. Create a new Azure Service Bus namespace using the command

New-AzureSBNamespace -Name mynamespace -Location “Central US” -CreateACSNamespace $true -NamespaceType Messaging

Example:

New-AzureSBNamespace -name axatozMobileConnector -location ‘central us’ -createACSNamespace $true -namespacetype Messaging

image

Log to Azure portal and verify ACS Management Portal enabled

image

Advertisements
 
Leave a comment

Posted by on May 8, 2015 in Development

 

Tags: , , , , , , ,

How to turn on/off AX VM through Powershell

First, you need to install Azure PowerShell

Go to the Azure Downloads page and click the link to install the Azure PowerShell cmdlets.

clip_image001

Step 1: Get-AzureVM to find out all your VMs hosted on Azure. In my case i have one VM for AX2012 which was deployed through LCS

image

Make sure to copy ServiceName and Name

image

Step 2: How to start

image

Syntax: Start-AzureVM -ServiceName “AX2012R3-Demo-Demo-da16992830bbf75a” -Name “DEMO-41e1aa3f1f”

Refresh Azure Portal > VM > Status , you will see eventually the status will become “Running”

image

image

Step 3: How to stop

image

Syntax: Stop-AzureVM -ServiceName “AX2012R3-Demo-Demo-da16992830bbf75a” -Name “DEMO-41e1aa3f1f” -Force

image

Bonus:

How to get RDP file

image

Syntax: Get-AzureRemoteDesktopFile -ServiceName “AX2012R3-Demo-Demo-da16992830bbf75a” -Name “DEMO-41e1aa3f1f” -LocalPath “c:\temp\AzureAX.rdp”

image

How to launch RDP from command line directly

image

Syntax: Get-AzureRemoteDesktopFile -ServiceName $serviceName -Name $vmName –Launch

A session will pop up and prompt to connect to the VM
image

How to delete a virtual machine

image

Syntax: Remove-AzureVM -ServiceName “AX2012R3-Demo-Demo-da16992830bbf75a” -Name “DEMO-41e1aa3f1f” –DeleteVHD

image

 
Leave a comment

Posted by on April 27, 2015 in Development

 

Tags: , , , , ,

Azure PowerShell 101

Before you go to the Cloud , let’s learn from Guang Yang about how to manage Azure from the PowerShell command line!

image

 
Leave a comment

Posted by on April 27, 2015 in Development

 

Tags: , , ,

Build and deploy scripts for Microsoft Dynamics AX 2012

For those who were looking for build and deploy scripts. At Tech Conference this year, Microsoft Build Team recommends to use this one

https://gallery.technet.microsoft.com/scriptcenter/Build-and-deploy-for-b166c6e4

clip_image001

 

Tags: , , , ,

How to deploy all AX2012 reports

 

There’re 3 different ways to deploy Dynamics AX2012 reports:

  1. Through AOT
    AOT > SSRS Reports > Reports > right click on report > Deploy Element
  2. Through Visual Studio
    Open the report project > Right click on the project or solution node > Deploy
  3. Through PowerShell
    Publish-AXReport -ReportName *

Through AOT

– Go to AOT > SSRS Reports > Reports > (right click on report) > Deploy Element

– Right click on the report node

– Click “Deploy Element”

Image(1)

Deploy AX2012 report through AOT

Through Visual Studio

– Open the report project

– Right click on the project or solution node

– Click “Deploy”

Image(2)

Deploy AX2012 report through Visual Studio

Through PowerShell

– Go to: Start > Administrative Tools > Microsoft Dynamics AX 2012 Management Shell

– Then enter Publish-AXReport -ReportName *

This will deploy all AX2012 reports into report server, you might want to do this after the initial installation as the report server doesn’t have all the report there yet. It takes about 20 minutes for me to deploy all the reports (that’s on my Hyper-V image, if run on better spec server, it could be much faster).

If you want to deploy a specific report, just replace the wildcard (*) with the report name.

Eg. Publish-AXReport -ReportName SalesInvoice

*It is the report name under AOT > SSRS Reports > Reports > SalesInvoice, not the project name under AOT > Visual Studio Projects > Dynamics AX Projects > SalesInvoiceReport

Image(3)

Publish-AXReport -ReportName * will deploy all report (use wildcard to deploy full set of report)

Image(4)

Report deployment in progress

Image(5)

Report deployment in progress

Image(6)

Report deployment in progress

Image(7)

Report deployment completed

Image(8)

 
1 Comment

Posted by on December 10, 2013 in Development

 

Tags: , , , , , ,

 
%d bloggers like this: