Please refer Read App.Config -
Please refer Connect MS Dynamics CRM
$crm_service = Invoke-CRMConn -OrganizationUrl $crm_organization_url -UserName $crm_username -Password $crm_password
## 1. To test the connection, check who you are:
Please refer Connect MS Dynamics CRM
$crm_service = Invoke-CRMConn -OrganizationUrl $crm_organization_url -UserName $crm_username -Password $crm_password
## 1. To test the connection, check who you are:
function WhoAMI() {
$request = new-object Microsoft.Crm.Sdk.Messages.WhoAmIRequest
$crm_service.Execute($request)
<#
UserId : 0dc96a70-952d-e611-80f0-0050568c6c1c
BusinessUnitId : a6099f28-952d-e611-80ec-0050568c6c1c
OrganizationId : 0d67a31e-952d-e611-80ec-0050568c6c1c
ResponseName : WhoAmI
Results : {[UserId, 0dc96a70-952d-e611-80f0-0050568c6c1c], [BusinessUnitId, a6099f28-0caf-e611-80ec-0050568c6c1c],
[OrganizationId, 0d67a31e-0caf-e611-80ec-0050568c6c1c]}
ExtensionData : System.Runtime.Serialization.ExtensionDataObject
#>
}
$request = new-object Microsoft.Crm.Sdk.Messages.WhoAmIRequest
$crm_service.Execute($request)
<#
UserId : 0dc96a70-952d-e611-80f0-0050568c6c1c
BusinessUnitId : a6099f28-952d-e611-80ec-0050568c6c1c
OrganizationId : 0d67a31e-952d-e611-80ec-0050568c6c1c
ResponseName : WhoAmI
Results : {[UserId, 0dc96a70-952d-e611-80f0-0050568c6c1c], [BusinessUnitId, a6099f28-0caf-e611-80ec-0050568c6c1c],
[OrganizationId, 0d67a31e-0caf-e611-80ec-0050568c6c1c]}
ExtensionData : System.Runtime.Serialization.ExtensionDataObject
#>
}