Dynamics AX
  RSS Feed  LinkedIn  Twitter
Want to turn you're data into a true asset? Ready to break free from the report factory?
Ready to gain true insights that are action focused for truly data informed decisions?
Want to do all of this across mutliple companies, instances of Dynamics and your other investments?
Hillstar Business Intelligence is the answer then! (www.HillstarBI.com)

Hillstar Business Intelligence for Microsoft Dynamics AX and NAV on Mobile, Desktop, Tablet

Let us prove to you how we can take the complexity out of the schema and truly enable users to answer the needed questions to run your business! Visit Hillstar Business Solutions at: www.HillstarBI.com

Friday, August 13, 2010

I believe in PowerShell!

Microsoft PowerShell is a very powerful tool. With it, all sort of administrative task can be taking care of. It can connect and work with all Microsoft porducts, and is very open for creating your own connections and integrating with third party applications.

It is a true scripting language that offers those invested into Dynamics AX a valuable TCO lowering option. First off you can download PowerShell for free, and there are so many great resources on the web now that can point you in the right direction for it's use.

But what about Dynamics AX? How can a scripting language help a Dynamics AX investment? Well with Dynamics AX, there is typically integrations, WCF services, need to promote code, to check the "health" of the application, database with SQL Server, etc. etc.

So there are processes with the administration of Dynamics AX, and all the things that connect and extend Dynamics AX, that can have the administrative task associated with them, automated.

Before we get into some of the ideas, let first review some resources, that are must have bookmarks, when diving into Microsoft's PowerShell.

I have placed these in order of which I think you should review them. The first is MSDN home for PowerShell, and it's the getting started guide. This is a must to have, as it can get you going with PowerShell, syntax, and starting about about uses.

Next we have 'The PowerShell Guy', which is a blog all about PowerShell. Great articles, and good place to check from time to time. Finally we have two examples of PowerShell working with AX. The first shows off some cool stuff with working with records within AX, making use of the .Net BC.

The last entry, is from the Axaptapedia site, and it talks about PowerShell, and have some decent examples of starting uses for PowerShell. Take the last part, for example.:

# load the .dll (similar to the c# "Using" statement)
[reflection.Assembly]::Loadfile("C:\Program Files\Microsoft Dynamics AX\50\Client\Bin\Microsoft.Dynamics.BusinessConnectorNet.dll")
# or [Reflection.Assembly]::LoadWithPartialName("Microsoft.Dynamics.BusinessConnectorNet")
# or [Reflection.Assembly]::Load("Microsoft.Dynamics.BusinessConnectorNet, Version=, Culture=neutral, PublicKeyToken=31bf3856ad364e35")
$ax = new-object Microsoft.Dynamics.BusinessConnectorNet.Axapta

# Look at the properties
# More info at: http://msdn.microsoft.com/en-us/library/aa626373.aspx
# $ax | get-member

$o = $ax.CallStaticClassMethod("SysLabel","labelId2String2","@SYS21669" )
$o # Should be "ABC"

# Look at some session info
$xSession = $ax.CreateAxaptaObject("XSession")
$xApplication = $ax.CreateAxaptaObject("XApplication")
$ax.CallStaticClassMethod("Session", "isBusinessConnector")
$ax.CallStaticClassMethod("Session", "getAOSInstance")
$ax.CallStaticClassMethod("Session", "getAOSPort")

I think the above example is most handy, as it can quickly get you into connecting with AX, through the application layer, via the .Net BC.

Now that you have the above, you would also need a download for PowerShell. A great KB article has this, plus more, which can be found here: Windows Management Framework (Windows PowerShell 2.0, WinRM 2.0, and BITS 4.0)

It's the full Windows Management Framework, including the latest PowerShell 2.0.

With all of this, and examples, think about now what manual processes you do? Have any WCF services? Not using Windows AppFabric yet? Well then you can use Powershell to automate deployment, cycling, etc of the WCF services that AX might consume. What about automating your promotion process?

You can create a Table / Form that manages what objects, projects, etc. gets promoted, when, and the from and to instances. Then Powershell can read from this information, and actually execute this for you.

Creating something of this fashion not only allows you to then document what is being promoted, but also is the control panel for such promotions.

There is a lot that PowerShell can offer to help lower the TCO of an AX investment, and you could even use PowerShell to create testing scripts to have some forms of automated testing or even stress testing.

That's all for now, check back soon, and feel free to leave a comment on how you use PowerShell to help manage your Dynamics AX investment!

Visit Hillstar Business Intelligence (www.HillstarBI.com) in order to truly unlock your data trapped in your Microsoft Dynamics investment. With our value driven business intelligence strategy Hillstar help you transform into a data informed company.

"Visit the Dynamics AX Community Page today!"

Labels: , , , , , ,


Post a Comment

<< Home

Copyright 2005-2011, J. Brandon George - All rights Reserved