Cette présentation, animée par Eric Ortiz (le chef de produit Biztalk Server Microsoft France) est la première d’une série qui aura pour objectif de vous faire découvrir les bénéfices qu’un éditeur peut tirer de Biztalk Server.
BizTalk Server 2006 R2 offre une infrastructure capable de connecter les applications existantes (quelle que soit la plateforme) et de constituer, d'exposer et de consommer de nouveaux services. C’est un outil qui permet donc aux éditeurs d’intégrer leurs applications dans des architectures SOA et et ainsi assurer l’interopérabilité de leurs outils au sein d'une plateforme unifiée.
De plus, il existe une vaste gamme d'adaptateurs de technologies et d'applications pour BizTalk Server. Grâce à une prise en charge immédiate et complète, depuis les protocoles de transport (FTP, SOAP et MQSeries) jusqu'à l'intégration de haut niveau des applications métier (PeopleSoft, SAP, et Siebel, Microsoft Dynamics), vous pouvez choisir comment connecter vos applications, vos plateformes et votre personnel. Nous vous fournissons tous les outils pour y parvenir.
If you want to use Dynamics CRM Web Service with Powershell and be able to Create, Update, Extract Data …
You have simply to create an assembly with wsdl utility and load it in Powershell.
Let’s try:
Make sure that you have access to Csharp compiler, for example by launching first cmd from Visual Studio command prompt menu.
Type
wsdl “http://<your servername>/MSCRMServices/2007/CrmService.asmx”
This will create a file called CrmService.csc
Compile the file:
csc /target:library CrmService.csc
Launch Powershell
powershell
Load the dll
$currentpath = pwd
[void][System.Reflection.Assembly]::LoadFile([System.IO.Path]::Combine($currentPath,"CrmService.dll"))
Create CrmService Object
$Crm = new-object "CrmService"
Connect to Crm Server
$token = new-object CrmAuthenticationToken
$tokenAuthenticationType=0
$Token.OrganizationName = "<your business unit name>" # for example “CRMVPC” if you user RC0 VPC 4.0
$Crm.Url = "http://<your servername>/MSCRMServices/2007/CrmService.asmx"
$Crm.CrmAuthenticationTokenValue = $token
$CrmCredentials = [System.Net.CredentialCache].DefaultCredentials
For the rest just use SDK Documentation
For example:
$contact = new-object "contact"
$contact.lastname = "Smith"
$id = $Crm.Create($contact)
If you type $id you must get the GUID created by CRM – Check now that the contact has been created in CRM.
If you have any question contact me xcourchi@microsoft.com.
Enjoy CRM 4.0 and Powershell !!!