Skip to content

Commit

Permalink
v2.2 merged
Browse files Browse the repository at this point in the history
  • Loading branch information
kenakamu committed Feb 15, 2016
2 parents 41f07f7 + 335b691 commit caf2436
Show file tree
Hide file tree
Showing 15 changed files with 611 additions and 301 deletions.
Binary file modified Microsoft.Xrm.Data.PowerShell/Microsoft.Crm.Sdk.Proxy.dll
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file modified Microsoft.Xrm.Data.PowerShell/Microsoft.Xrm.Data.PowerShell.psd1
Binary file not shown.
884 changes: 597 additions & 287 deletions Microsoft.Xrm.Data.PowerShell/Microsoft.Xrm.Data.PowerShell.psm1

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -26,17 +26,19 @@
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<ItemGroup />
<ItemGroup>
<Content Include="Microsoft.IdentityModel.Clients.ActiveDirectory.dll" />
<Content Include="Microsoft.IdentityModel.Clients.ActiveDirectory.WindowsForms.dll" />
<Content Include="Microsoft.Xrm.Sdk.Deployment.dll" />
</ItemGroup>
<ItemGroup>
<Compile Include="Microsoft.Crm.Sdk.Proxy.dll" />
<Compile Include="Microsoft.Xrm.Data.PowerShell.psd1" />
<Compile Include="Microsoft.Xrm.Data.PowerShell.psm1" />
<Compile Include="Microsoft.Xrm.Sdk.Deployment.dll" />
<Compile Include="Microsoft.Xrm.Sdk.dll" />
<Compile Include="Microsoft.Xrm.Tooling.Connector.dll" />
<Compile Include="Microsoft.Xrm.Tooling.CrmConnectControl.dll" />
<Compile Include="Microsoft.Xrm.Tooling.CrmConnector.Powershell.dll" />
<Compile Include="Microsoft.Xrm.Tooling.PackageDeployment.Powershell.dll" />
<Compile Include="Microsoft.Xrm.Tooling.Ui.Styles.dll" />
<Compile Include="Microsoft.Xrm.Tooling.WebResourceUtility.dll" />
</ItemGroup>
Expand Down
Binary file modified Microsoft.Xrm.Data.PowerShell/Microsoft.Xrm.Sdk.Deployment.dll
Binary file not shown.
Binary file modified Microsoft.Xrm.Data.PowerShell/Microsoft.Xrm.Sdk.dll
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
20 changes: 9 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,13 +1,11 @@

# Microsoft.Xrm.Data.PowerShell

This is v2.xx branch is Dynamics CRM 2016 SDK base. This version is compatible with Azure Automation.

### Overview
**Microsoft.Xrm.Data.Powershell.zip** contains one primary module, Microsoft.Xrm.Data.Powershell, but also relies on an included dll module Microsoft.Xrm.Tooling.CrmConnector.Powershell.

**Version 1.xx** is Dynamics CRM 2015 SDK base.

**Version 2.xx** is Dynamics CRM 2016 SDK base and it is compatibile with Azure Automation. For more information about v2.xx, go to [v2.0 branch](https://github.com/seanmcne/Microsoft.Xrm.Data.PowerShell/tree/v2)

Releases are found on the [Release Page](https://github.com/seanmcne/Microsoft.Xrm.Data.PowerShell/releases)

**Microsoft.Xrm.Data.Powershell**
Expand Down Expand Up @@ -45,24 +43,24 @@ Import-Module Microsoft.Xrm.Data.Powershell
*The module requires PowerShell v4.0.

###How module works
Microsoft.Xrm.Data.Powershell module exposes many functions, but you can use Connect-CrmOnlineDiscovery and/or Connect-CrmOnpremDiscovery to connect to any CRM Online/OnPrem organization. By executing the function, it creates $conn global variable. Any other functions which needs to connect to the CRM Organization takes connection parameter. You can explicitly specify the connection by using -conn parameter, but if you omit the connection, functions retrieve connection from global variable.
Microsoft.Xrm.Data.Powershell module exposes many functions, but you can use Connect-CrmOnlineDiscovery, Connect-CrmOnPremDiscovery to connect to any CRM organization by using Discovery Service. Use Connect-CrmOnline function for Azure Automation. By executing these function, it creates $conn global variable. Any other functions which needs to connect to the CRM Organization takes connection parameter. You can explicitly specify the connection by using -conn parameter, but if you omit the connection, functions retrieve connection from global variable.

Alternatively, you can create multiple connection objects and pass them into each function under the –conn parameter.

```PowerShell
$global:conn = Get-CrmConnection -InteractiveMode
```
See more detail about [Get-CrmConnection](https://technet.microsoft.com/en-us/library/dn756303.aspx) function.<br/>

###Example
This example shows how to create connection and do CRUD operation as well as manipulate System Settings.
<p>1. Run following command to connect to Dynamics CRM Organization via the Xrm Tooling GUI.</p>
```PowerShell
# Online
Connect-CrmOnlineDiscovery -InteractiveMode
# OnPrem
Connect-CrmOnpremDiscovery -InteractiveMode
Connect-CrmOnPremDiscovery -InteractiveMode
# Azure Automation
Connect-CrmOnline -Credential $cred -ServerUri "https://<org>.crm.dynamics.com"
```

For Azure Automation, write all scripts inside inlinescript block.

<p>2. Run following command to test CRUD.</p>
```PowerShell
# Create an account and store record Guid to a variable
Expand Down

0 comments on commit caf2436

Please sign in to comment.