Welcome to MSDN Blogs Sign in | Join | Help
Using Powershell and Dynamics CRM

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 !!!

 

 

La presse relaie les annonces faîtes par Microsoft à Convergence

Convergence s'est tenu du 11 au 14 mars 2007 à San Diego (Californie). 

Cet événement a permis de réunir clients, partenaires, employés et experts (7400 personnes au total). Le sujet: les applications Dynamics.

Microsoft renforce la verticalisation de ses PGI

Microsoft annonce un client Office et Sharepoint pour accéder à ses PGI

Microsoft façonne un « myspace » pour les utilisateurs de ses PGI

CONVERGENCE - Microsoft ups Dynamics' industry focus

CONVERGENCE - Microsoft moves closer to Dynamics platform

Testez Microsoft Dynamics CRM en ligne

C’est en anglais et ça n’est pas très rapide mais c’est la manière la plus simple de découvrir Microsoft CRM sans rien installer : en manipulant.

http://starshot.com/crmdemo

 

Page view tracker