diff --git a/Microsoft.Xrm.Data.PowerShell/Microsoft.QualityTools.Testing.Fakes.dll b/Microsoft.Xrm.Data.PowerShell/Microsoft.QualityTools.Testing.Fakes.dll index dc30ca7..2d35642 100644 Binary files a/Microsoft.Xrm.Data.PowerShell/Microsoft.QualityTools.Testing.Fakes.dll and b/Microsoft.Xrm.Data.PowerShell/Microsoft.QualityTools.Testing.Fakes.dll differ diff --git a/Microsoft.Xrm.Data.PowerShell/Microsoft.Xrm.Data.PowerShell.Help.pshproj b/Microsoft.Xrm.Data.PowerShell/Microsoft.Xrm.Data.PowerShell.Help.pshproj index da4b6da..e81c471 100644 --- a/Microsoft.Xrm.Data.PowerShell/Microsoft.Xrm.Data.PowerShell.Help.pshproj +++ b/Microsoft.Xrm.Data.PowerShell/Microsoft.Xrm.Data.PowerShell.Help.pshproj @@ -1,7 +1,7 @@ Microsoft.Xrm.Data.PowerShell - 2.8.8 + 2.8.9 true false @@ -893,8 +893,10 @@ When omitting parameter names, you do not provide $conn, cmdlets automatically f Connect-CrmOnline - Connect-CrmOnline [-ServerUrl] <String> [-Credential] <PSCredential> [[-ForceDiscovery] <SwitchParameter>] [[-ForceOAuth] <SwitchParameter>] [[-OAuthClientId] <String>] [[-OAuthRedirectUri] <String>] - Connect-CrmOnline [-ServerUrl] <String> [-OAuthClientId] <String> [-OAuthRedirectUri] <String> [-ClientSecret] <String> + Connect-CrmOnline [-ConnectionString] <String> [-ConnectionTimeoutInSeconds <Int32>] [-LogWriteDirectory <String>] [-BypassTokenCache] + Connect-CrmOnline [-ServerUrl] <String> [[-ForceDiscovery] <SwitchParameter>] [[-ForceOAuth] <SwitchParameter>] [[-OAuthClientId] <String>] [[-OAuthRedirectUri] <String>] [[-Username] <String>] [-ConnectionTimeoutInSeconds <Int32>] [-LogWriteDirectory <String>] [-BypassTokenCache] + Connect-CrmOnline [-ServerUrl] <String> [-Credential] <PSCredential> [[-ForceDiscovery] <SwitchParameter>] [[-ForceOAuth] <SwitchParameter>] [[-OAuthClientId] <String>] [[-OAuthRedirectUri] <String>] [-ConnectionTimeoutInSeconds <Int32>] [-LogWriteDirectory <String>] [-BypassTokenCache] + Connect-CrmOnline [-ServerUrl] <String> [-OAuthClientId] <String> [[-OAuthRedirectUri] <String>] [-ClientSecret] <String> [-ConnectionTimeoutInSeconds <Int32>] [-LogWriteDirectory <String>] [-BypassTokenCache] Connects to CRM Online organization without using Discovery Service. @@ -909,8 +911,10 @@ You can use Get-Credential to create Credential information. - - + + + + @@ -930,15 +934,17 @@ You can use Get-Credential to create Credential information. System.Management.Automation.ValidatePatternAttribute System.Management.Automation.ParameterAttribute System.Management.Automation.ParameterAttribute + System.Management.Automation.ParameterAttribute System.Management.Automation.ArgumentTypeConverterAttribute A Url of your Dynamics CRM Online organization. - + ForceDiscovery + System.Management.Automation.ParameterAttribute System.Management.Automation.ParameterAttribute System.Management.Automation.ArgumentTypeConverterAttribute @@ -946,31 +952,34 @@ You can use Get-Credential to create Credential information. Forces the connector to verify an org connection with discovery (NOT COMPATIBLE with Partner CSP). - + ForceOAuth + System.Management.Automation.ParameterAttribute System.Management.Automation.ParameterAttribute System.Management.Automation.ArgumentTypeConverterAttribute - Forces oAuth authentication via Azure Active Directory. The default auth type is Office365. + Forces oAuth authentication via Azure Active Directory. If a credential is not provided, then Single Sign on will be attempted, if you wish to use a credential that is not your currently signed in user you may provide a credential. - + OAuthClientId System.Management.Automation.ValidateScriptAttribute System.Management.Automation.ParameterAttribute System.Management.Automation.ParameterAttribute + System.Management.Automation.ParameterAttribute System.Management.Automation.ArgumentTypeConverterAttribute Azure Active Directory Native Application Id - + OAuthRedirectUri + System.Management.Automation.ParameterAttribute System.Management.Automation.ParameterAttribute System.Management.Automation.ParameterAttribute System.Management.Automation.ArgumentTypeConverterAttribute @@ -989,10 +998,60 @@ You can use Get-Credential to create Credential information. Client Secret value when using AzureAD ClientSecret auth and an application user + + ConnectionString + + System.Management.Automation.ParameterAttribute + System.Management.Automation.ArgumentTypeConverterAttribute + + + Override the connectionstring used to connect to the instance, this can be used to debug scenarios or accomidate new options that may not be supported in the mainstream module. Please proceed with caution using this parameter as it could be removed in the future or may cause unintended consequences when used in combination with connection string parameters that are unexpected. + + + + ConnectionTimeoutInSeconds + + System.Management.Automation.ParameterAttribute + System.Management.Automation.ArgumentTypeConverterAttribute + + + Integer value for the connection timeout in seconds + 120 + + + LogWriteDirectory + + System.Management.Automation.ParameterAttribute + System.Management.Automation.ArgumentTypeConverterAttribute + + + Override the directory location to store the Xrm.Tooling.Connector log files. The directory must already exist, and the user who is running the cmdlet must have Write permission to the directory. You must also use the -Verbose parameter along with the -LogWriteDirectory parameter to be able to store the log files in a custom location. + + + + BypassTokenCache + + System.Management.Automation.ParameterAttribute + System.Management.Automation.ArgumentTypeConverterAttribute + + + Will bypass using a local cache path, this is most commonly used in conjunction with build pipelines in azure dev ops or limited access environments + + + + Username + + System.Management.Automation.ParameterAttribute + System.Management.Automation.ArgumentTypeConverterAttribute + + + This should be used when needing to provide a username hint to ADAL, this will ensure the correct identity is used to attempt acquring a token. + + - Example 1 + Example 1 Office365 legacy authentication PS C:\> Connect-CrmOnline -Credential (Get-Credential) -ServerUrl "https://contoso.crm.dynamics.com" Connect to online using your organization URL IsReady : True @@ -1012,17 +1071,17 @@ LastCrmException : [OrganizationDataService, https://contoso.api.crm.dynamics.com/XRMServices/2011/OrganizationData.svc]} ConnectionLockObject : System.Object -ConnectedOrgVersion : 8.2.1.359 +ConnectedOrgVersion : 9.1.0000.0000 DisableCrossThreadSafeties : False CallerId : 00000000-0000-0000-0000-000000000000 - Example 2 + Example 2 oAuth Single Sign on PS C:\> Connect-CrmOnline -ServerUrl "https://contoso.crm.dynamics.com" -ForceOAuth - Connect to online using your organization URL using oAuth and get prompted for a credential (versus providing one) + Connect to online using your organization URL using oAuth attempting single sign on - sign on using ADAL and the browser is attempted when a credential is not provided. IsReady : True IsBatchOperationsAvailable : True -Authority : https://login.windows.net/99f9884f-8651-415f-91ab-217c7036db97/oauth2/authorize/ +Authority : https://login.windows.net/{guid}/oauth2/authorize/ OAuthUserId : user@contoso.com ActiveAuthenticationType : OAuth OrganizationServiceProxy : @@ -1034,29 +1093,49 @@ ConnectedOrgFriendlyName : Contoso ConnectedOrgUniqueName : contosocrmol ConnectedOrgPublishedEndpoints : {[WebApplication, https://contoso.crm.dynamics.com/], [OrganizationService, https://contoso.api.crm.dynamics.com/XRMServices/2011/Organization.svc], [OrganizationDataService, https://contoso.api.crm.dynamics.com/XRMServices/2011/OrganizationData.svc]} ConnectionLockObject : System.Object -ConnectedOrgVersion : 8.2.1.359 +ConnectedOrgVersion : 9.1.0000.0000 DisableCrossThreadSafeties : False CallerId : 00000000-0000-0000-0000-000000000000 - Example 3 + Example 3 oAuth with credenital + PS C:\> Connect-CrmOnline -ServerUrl "https://contoso.crm.dynamics.com" -Credential (Get-Credential) -ForceOAuth + Connect to online using your organization URL using oAuth using provided credential. + IsReady : True +IsBatchOperationsAvailable : True +Authority : https://login.windows.net/{guid}/oauth2/authorize/ +OAuthUserId : user@contoso.com +ActiveAuthenticationType : OAuth +OrganizationServiceProxy : +OrganizationWebProxyClient : Microsoft.Xrm.Sdk.WebServiceClient.OrganizationWebProxyClient +LastCrmError : +LastCrmException : +CrmConnectOrgUriActual : https://contoso.api.crm.dynamics.com/XRMServices/2011/Organization.svc/web?SDKClientVersion=9.0.9002.0 +ConnectedOrgFriendlyName : Contoso +ConnectedOrgUniqueName : contosocrmol +ConnectedOrgPublishedEndpoints : {[WebApplication, https://contoso.crm.dynamics.com/], [OrganizationService, https://contoso.api.crm.dynamics.com/XRMServices/2011/Organization.svc], [OrganizationDataService, https://contoso.api.crm.dynamics.com/XRMServices/2011/OrganizationData.svc]} +ConnectionLockObject : System.Object +ConnectedOrgVersion : 9.1.0000.0000 +DisableCrossThreadSafeties : False +CallerId : 00000000-0000-0000-0000-000000000000 + + + Example 4 oAuth with ClientSecret PS C:\> Connect-CrmOnline -ServerUrl "https://contoso.crm.dynamics.com" -ClientSecret "T_DA0EY+DdfaJFH3/DFLK@QoFbY" -OAuthClientId "812fad6d-4727-44f5-b02e-f35d74efb78e" -OAuthRedirectUri "https://tempuri.org" Connect to a CDS instance as an application user, using ClientSecret authentication MaxRetryCount : 10 RetryPauseTime : 00:00:05 IsReady : True IsBatchOperationsAvailable : True -Authority : https://login.microsoftonline.com/03cd4258-2030-45a3-aea9-508adbed80b6/oauth2/authorize/ +Authority : https://login.microsoftonline.com/{guid}/oauth2/authorize/ OAuthUserId : ActiveAuthenticationType : ClientSecret OrganizationServiceProxy : OrganizationWebProxyClient : Microsoft.Xrm.Sdk.WebServiceClient.OrganizationWebProxyClient -CurrentAccessToken : eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiIsIng1dCI6IkhsQzBSMTJza3hOWjFXUXdtak9GXzZ0X3RER - pIrvb2bp0TV6PL1SUw79pXYW-Krtg LastCrmError : LastCrmException : CrmConnectOrgUriActual : https://contoso.crm.dynamics.com/XRMServices/2011/Organization.svc/web?SDKClientV - ersion=9.0.44.892 + ersion=9.1.0000.0000 ConnectedOrgFriendlyName : [9.1] contoso seanmcn ConnectedOrgUniqueName : contoso ConnectedOrgPublishedEndpoints : {[WebApplication, https://contoso.crm.dynamics.com/], [OrganizationService, @@ -1064,17 +1143,25 @@ ConnectedOrgPublishedEndpoints : {[WebApplication, https://contoso.crm.dyna [OrganizationDataService, https://contoso.api.crm.dynamics.com/XRMServices/2011/OrganizationData.svc]} ConnectionLockObject : System.Object -ConnectedOrgVersion : 9.1.0.13535 +ConnectedOrgVersion : 9.1.0000.0000 ConnectedOrgId : b283ca00-d54d-4dd0-ba1a-ee8e51d5256a DisableCrossThreadSafeties : False CallerId : 00000000-0000-0000-0000-000000000000 CallerAADObjectId : SessionTrackingId : ForceServerMetadataCacheConsistency : False -SdkVersionProperty : 9.0.44.892 +SdkVersionProperty : 9.1.0000.0000 TenantId : 03cd4258-2030-45a3-aea9-508adbed80b6 EnvironmentId : 11537934-8ab9-4721-aba1-0feff3133e38 -_sdkVersionProperty : 9.0.44.892 +_sdkVersionProperty : 9.1.0000.0000 + + + Example 5 ConnectionString FOR DEBUGGING + PS C:\> Connect-CrmOnline -ConnectionString "RequireNewInstance=True;Url=https://naosrtw.crm.dynamics.com;AuthType=ClientSecret;ClientId=812fad6d-4727-44f5-b02e-f35d74efb78e;SkipDiscovery=True;ClientSecret=T_DA0EY+DdfaJFH3/DFLK@QoFbY" -ConnectionTimeoutInSeconds 500 -LogWriteDirectory "C:\temp\" + Connect to a CDS instance as an application user, using a custom connectionstring + +Use with caution and *only* for debugging as this may change or parameter may be removed in the future. + @@ -10679,5 +10766,66 @@ When omitting conn parameter, cmdlets automatically finds it. false + + Disable-CrmConnectorVerboseLogging + + Disable-CrmConnectorVerboseLogging + + + + + + + + + + + + + + + + + + + + false + + + Enable-CrmConnectorVerboseLogging + + Enable-CrmConnectorVerboseLogging [[-filePath] <String>] + + + + + + + + + + + + + + + + + + filePath + + System.Management.Automation.ParameterAttribute + System.Management.Automation.ArgumentTypeConverterAttribute + + + + + + + + + + false + \ No newline at end of file diff --git a/Microsoft.Xrm.Data.PowerShell/Microsoft.Xrm.Data.PowerShell.Help.xml b/Microsoft.Xrm.Data.PowerShell/Microsoft.Xrm.Data.PowerShell.Help.xml index 1cbdba2..ccc3d8b 100644 --- a/Microsoft.Xrm.Data.PowerShell/Microsoft.Xrm.Data.PowerShell.Help.xml +++ b/Microsoft.Xrm.Data.PowerShell/Microsoft.Xrm.Data.PowerShell.Help.xml @@ -1987,6 +1987,103 @@ When omitting parameter names, you do not provide $conn, cmdlets automatically f You can use Get-Credential to create Credential information. + + Connect-CrmOnline + + ConnectionString + + Override the connectionstring used to connect to the instance, this can be used to debug scenarios or accomidate new options that may not be supported in the mainstream module. Please proceed with caution using this parameter as it could be removed in the future or may cause unintended consequences when used in combination with connection string parameters that are unexpected. + + String + + + ConnectionTimeoutInSeconds + + Integer value for the connection timeout in seconds + + Int32 + + + LogWriteDirectory + + Override the directory location to store the Xrm.Tooling.Connector log files. The directory must already exist, and the user who is running the cmdlet must have Write permission to the directory. You must also use the -Verbose parameter along with the -LogWriteDirectory parameter to be able to store the log files in a custom location. + + String + + + BypassTokenCache + + Will bypass using a local cache path, this is most commonly used in conjunction with build pipelines in azure dev ops or limited access environments + + SwitchParameter + + + + Connect-CrmOnline + + ServerUrl + + A Url of your Dynamics CRM Online organization. + + String + + + ForceDiscovery + + Forces the connector to verify an org connection with discovery (NOT COMPATIBLE with Partner CSP). + + SwitchParameter + + + ForceOAuth + + Forces oAuth authentication via Azure Active Directory. If a credential is not provided, then Single Sign on will be attempted, if you wish to use a credential that is not your currently signed in user you may provide a credential. + + SwitchParameter + + + OAuthClientId + + Azure Active Directory Native Application Id + + String + + + OAuthRedirectUri + + Azure Active Directory Redirect Uri (Must match the Applications redirect uri) + + String + + + Username + + This should be used when needing to provide a username hint to ADAL, this will ensure the correct identity is used to attempt acquring a token. + + String + + + ConnectionTimeoutInSeconds + + Integer value for the connection timeout in seconds + + Int32 + + + LogWriteDirectory + + Override the directory location to store the Xrm.Tooling.Connector log files. The directory must already exist, and the user who is running the cmdlet must have Write permission to the directory. You must also use the -Verbose parameter along with the -LogWriteDirectory parameter to be able to store the log files in a custom location. + + String + + + BypassTokenCache + + Will bypass using a local cache path, this is most commonly used in conjunction with build pipelines in azure dev ops or limited access environments + + SwitchParameter + + Connect-CrmOnline @@ -2003,34 +2100,55 @@ You can use Get-Credential to create Credential information. PSCredential - + ForceDiscovery Forces the connector to verify an org connection with discovery (NOT COMPATIBLE with Partner CSP). SwitchParameter - + ForceOAuth - Forces oAuth authentication via Azure Active Directory. The default auth type is Office365. + Forces oAuth authentication via Azure Active Directory. If a credential is not provided, then Single Sign on will be attempted, if you wish to use a credential that is not your currently signed in user you may provide a credential. SwitchParameter - + OAuthClientId Azure Active Directory Native Application Id String - + OAuthRedirectUri Azure Active Directory Redirect Uri (Must match the Applications redirect uri) String + + ConnectionTimeoutInSeconds + + Integer value for the connection timeout in seconds + + Int32 + + + LogWriteDirectory + + Override the directory location to store the Xrm.Tooling.Connector log files. The directory must already exist, and the user who is running the cmdlet must have Write permission to the directory. You must also use the -Verbose parameter along with the -LogWriteDirectory parameter to be able to store the log files in a custom location. + + String + + + BypassTokenCache + + Will bypass using a local cache path, this is most commonly used in conjunction with build pipelines in azure dev ops or limited access environments + + SwitchParameter + Connect-CrmOnline @@ -2041,14 +2159,14 @@ You can use Get-Credential to create Credential information. String - + OAuthClientId Azure Active Directory Native Application Id String - + OAuthRedirectUri Azure Active Directory Redirect Uri (Must match the Applications redirect uri) @@ -2062,6 +2180,27 @@ You can use Get-Credential to create Credential information. String + + ConnectionTimeoutInSeconds + + Integer value for the connection timeout in seconds + + Int32 + + + LogWriteDirectory + + Override the directory location to store the Xrm.Tooling.Connector log files. The directory must already exist, and the user who is running the cmdlet must have Write permission to the directory. You must also use the -Verbose parameter along with the -LogWriteDirectory parameter to be able to store the log files in a custom location. + + String + + + BypassTokenCache + + Will bypass using a local cache path, this is most commonly used in conjunction with build pipelines in azure dev ops or limited access environments + + SwitchParameter + @@ -2089,7 +2228,7 @@ You can use Get-Credential to create Credential information. - + ForceDiscovery Forces the connector to verify an org connection with discovery (NOT COMPATIBLE with Partner CSP). @@ -2101,10 +2240,10 @@ You can use Get-Credential to create Credential information. - + ForceOAuth - Forces oAuth authentication via Azure Active Directory. The default auth type is Office365. + Forces oAuth authentication via Azure Active Directory. If a credential is not provided, then Single Sign on will be attempted, if you wish to use a credential that is not your currently signed in user you may provide a credential. SwitchParameter @@ -2113,7 +2252,7 @@ You can use Get-Credential to create Credential information. - + OAuthClientId Azure Active Directory Native Application Id @@ -2125,7 +2264,7 @@ You can use Get-Credential to create Credential information. - + OAuthRedirectUri Azure Active Directory Redirect Uri (Must match the Applications redirect uri) @@ -2149,6 +2288,66 @@ You can use Get-Credential to create Credential information. + + ConnectionString + + Override the connectionstring used to connect to the instance, this can be used to debug scenarios or accomidate new options that may not be supported in the mainstream module. Please proceed with caution using this parameter as it could be removed in the future or may cause unintended consequences when used in combination with connection string parameters that are unexpected. + + String + + String + + + + + + ConnectionTimeoutInSeconds + + Integer value for the connection timeout in seconds + + Int32 + + Int32 + + + 120 + + + LogWriteDirectory + + Override the directory location to store the Xrm.Tooling.Connector log files. The directory must already exist, and the user who is running the cmdlet must have Write permission to the directory. You must also use the -Verbose parameter along with the -LogWriteDirectory parameter to be able to store the log files in a custom location. + + String + + String + + + + + + BypassTokenCache + + Will bypass using a local cache path, this is most commonly used in conjunction with build pipelines in azure dev ops or limited access environments + + SwitchParameter + + SwitchParameter + + + + + + Username + + This should be used when needing to provide a username hint to ADAL, this will ensure the correct identity is used to attempt acquring a token. + + String + + String + + + + @@ -2184,7 +2383,7 @@ You can use Get-Credential to create Credential information. - -------------------------- Example 1 -------------------------- + -------------------------- Example 1 Office365 legacy authentication -------------------------- PS C:\> @@ -2210,7 +2409,7 @@ LastCrmException : [OrganizationDataService, https://contoso.api.crm.dynamics.com/XRMServices/2011/OrganizationData.svc]} ConnectionLockObject : System.Object -ConnectedOrgVersion : 8.2.1.359 +ConnectedOrgVersion : 9.1.0000.0000 DisableCrossThreadSafeties : False CallerId : 00000000-0000-0000-0000-000000000000 @@ -2223,18 +2422,18 @@ CallerId : 00000000-0000-0000-0000-000000000000 - -------------------------- Example 2 -------------------------- + -------------------------- Example 2 oAuth Single Sign on -------------------------- PS C:\> PS C:\> Connect-CrmOnline -ServerUrl "https://contoso.crm.dynamics.com" -ForceOAuth - Connect to online using your organization URL using oAuth and get prompted for a credential (versus providing one) + Connect to online using your organization URL using oAuth attempting single sign on - sign on using ADAL and the browser is attempted when a credential is not provided. IsReady : True IsBatchOperationsAvailable : True -Authority : https://login.windows.net/99f9884f-8651-415f-91ab-217c7036db97/oauth2/authorize/ +Authority : https://login.windows.net/{guid}/oauth2/authorize/ OAuthUserId : user@contoso.com ActiveAuthenticationType : OAuth OrganizationServiceProxy : @@ -2246,7 +2445,7 @@ ConnectedOrgFriendlyName : Contoso ConnectedOrgUniqueName : contosocrmol ConnectedOrgPublishedEndpoints : {[WebApplication, https://contoso.crm.dynamics.com/], [OrganizationService, https://contoso.api.crm.dynamics.com/XRMServices/2011/Organization.svc], [OrganizationDataService, https://contoso.api.crm.dynamics.com/XRMServices/2011/OrganizationData.svc]} ConnectionLockObject : System.Object -ConnectedOrgVersion : 8.2.1.359 +ConnectedOrgVersion : 9.1.0000.0000 DisableCrossThreadSafeties : False CallerId : 00000000-0000-0000-0000-000000000000 @@ -2259,7 +2458,43 @@ CallerId : 00000000-0000-0000-0000-000000000000 - -------------------------- Example 3 -------------------------- + -------------------------- Example 3 oAuth with credenital -------------------------- + + PS C:\> + + PS C:\> Connect-CrmOnline -ServerUrl "https://contoso.crm.dynamics.com" -Credential (Get-Credential) -ForceOAuth + + Connect to online using your organization URL using oAuth using provided credential. + + + IsReady : True +IsBatchOperationsAvailable : True +Authority : https://login.windows.net/{guid}/oauth2/authorize/ +OAuthUserId : user@contoso.com +ActiveAuthenticationType : OAuth +OrganizationServiceProxy : +OrganizationWebProxyClient : Microsoft.Xrm.Sdk.WebServiceClient.OrganizationWebProxyClient +LastCrmError : +LastCrmException : +CrmConnectOrgUriActual : https://contoso.api.crm.dynamics.com/XRMServices/2011/Organization.svc/web?SDKClientVersion=9.0.9002.0 +ConnectedOrgFriendlyName : Contoso +ConnectedOrgUniqueName : contosocrmol +ConnectedOrgPublishedEndpoints : {[WebApplication, https://contoso.crm.dynamics.com/], [OrganizationService, https://contoso.api.crm.dynamics.com/XRMServices/2011/Organization.svc], [OrganizationDataService, https://contoso.api.crm.dynamics.com/XRMServices/2011/OrganizationData.svc]} +ConnectionLockObject : System.Object +ConnectedOrgVersion : 9.1.0000.0000 +DisableCrossThreadSafeties : False +CallerId : 00000000-0000-0000-0000-000000000000 + + + + + + + + + + + -------------------------- Example 4 oAuth with ClientSecret -------------------------- PS C:\> @@ -2272,17 +2507,15 @@ CallerId : 00000000-0000-0000-0000-000000000000 +_sdkVersionProperty : 9.1.0000.0000 + + + + + + + + + + + -------------------------- Example 5 ConnectionString FOR DEBUGGING -------------------------- + + PS C:\> + + PS C:\> Connect-CrmOnline -ConnectionString "RequireNewInstance=True;Url=https://naosrtw.crm.dynamics.com;AuthType=ClientSecret;ClientId=812fad6d-4727-44f5-b02e-f35d74efb78e;SkipDiscovery=True;ClientSecret=T_DA0EY+DdfaJFH3/DFLK@QoFbY" -ConnectionTimeoutInSeconds 500 -LogWriteDirectory "C:\temp\" + + Connect to a CDS instance as an application user, using a custom connectionstring + Use with caution and *only* for debugging as this may change or parameter may be removed in the future. + + + @@ -22557,4 +22811,144 @@ When omitting conn parameter, cmdlets automatically finds it. + + + + Disable-CrmConnectorVerboseLogging + + + + + + + Disable + CrmConnectorVerboseLogging + + + + + + + + Disable-CrmConnectorVerboseLogging + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Enable-CrmConnectorVerboseLogging + + + + + + + Enable + CrmConnectorVerboseLogging + + + + + + + + Enable-CrmConnectorVerboseLogging + + filePath + + + + String + + + + + + filePath + + + + String + + String + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/Microsoft.Xrm.Data.PowerShell/Microsoft.Xrm.Data.PowerShell.psd1 b/Microsoft.Xrm.Data.PowerShell/Microsoft.Xrm.Data.PowerShell.psd1 index abc96b0..f40cb37 100644 --- a/Microsoft.Xrm.Data.PowerShell/Microsoft.Xrm.Data.PowerShell.psd1 +++ b/Microsoft.Xrm.Data.PowerShell/Microsoft.Xrm.Data.PowerShell.psd1 @@ -115,14 +115,21 @@ PrivateData = @{ # ReleaseNotes of this module ReleaseNotes = ' +Lots of changes and enhancements to auth in this release: +- Updated to attempting SSO with oAuth by default +- Added an option for username to "hint" your username for SSO/browser based auth, if you get an immediate failure on connecting via oAuth (locally) try adding a username hint to help +- If you are logged into a managed pc by your org you should be able to use -forceoAuth and the serverurl without any other arguemnts to login and use your current users credentials +- Older auth methods continue to function as-is +- Removed requirement for redirecturi on clientsecret as it is not technically required +- redirected verbose connector output into a local file when -verbose is used with connect-crmonline +- Added option for debugging connections using a provided connectionstring - please only use this for debugging for now. NOTE: If you use this please let me know how you are using it. +- source for connector: https://www.powershellgallery.com/packages/Microsoft.Xrm.Tooling.CrmConnector.PowerShell/ Including newer xrm tooling which has the following improvements: +- 3.3.0.899 Added initial support for in memory log capture support. +- 3.3.0.897 Fixed an issue with sovereign cloud discovery reference data that would prevent a login control from picking the correct global discovery server when connecting. - 3.3.0.891 Fixed an error where discovery would be used when using AD and IFD to connect to onpremise even if connection strings where used. - 3.3.0.890 Fixed an error where timeout property was not properly assigned when using Non-oAuth types -- 3.3.0.890 Fixed an error with setting CallerId when ClientSecret Auth type is used. -Other Changes: -- Updated security role functions -- Added new formatting for the conn object to avoid showing the current auth token -- source for connector: https://www.powershellgallery.com/packages/Microsoft.Xrm.Tooling.CrmConnector.PowerShell/' +- 3.3.0.890 Fixed an error with setting CallerId when ClientSecret Auth type is used. ' # Prerelease = '-alpha' } # End of PSData hashtable diff --git a/Microsoft.Xrm.Data.PowerShell/Microsoft.Xrm.Data.PowerShell.psm1 b/Microsoft.Xrm.Data.PowerShell/Microsoft.Xrm.Data.PowerShell.psm1 index 030e0c2..9c283c9 100644 --- a/Microsoft.Xrm.Data.PowerShell/Microsoft.Xrm.Data.PowerShell.psm1 +++ b/Microsoft.Xrm.Data.PowerShell/Microsoft.Xrm.Data.PowerShell.psm1 @@ -82,18 +82,24 @@ function Connect-CrmOnline{ # .ExternalHelp Microsoft.Xrm.Data.PowerShell.Help.xml [CmdletBinding()] PARAM( + [parameter(Position=1, Mandatory=$true, ParameterSetName="connectionstring")] + [string]$ConnectionString, [parameter(Position=1, Mandatory=$true, ParameterSetName="Secret")] [Parameter(Position=1,Mandatory=$true, ParameterSetName="Creds")] + [Parameter(Position=1,Mandatory=$true, ParameterSetName="NoCreds")] [ValidatePattern('([\w-]+).crm([0-9]*).(microsoftdynamics|dynamics|crm[\w-]*).(com|de|us)')] [string]$ServerUrl, [parameter(Position=2, Mandatory=$true, ParameterSetName="Creds")] [PSCredential]$Credential, [Parameter(Position=3,Mandatory=$false, ParameterSetName="Creds")] + [Parameter(Position=2,Mandatory=$false, ParameterSetName="NoCreds")] [switch]$ForceDiscovery, [Parameter(Position=4,Mandatory=$false, ParameterSetName="Creds")] - [switch]$ForceOAuth, + [Parameter(Position=3,Mandatory=$false, ParameterSetName="NoCreds")] + [switch]$ForceOAuth, [parameter(Position=2, Mandatory=$true, ParameterSetName="Secret")] [Parameter(Position=5,Mandatory=$false, ParameterSetName="Creds")] + [Parameter(Position=4,Mandatory=$false, ParameterSetName="NoCreds")]         [ValidateScript({             try {                 [System.Guid]::Parse($_) | Out-Null @@ -103,29 +109,66 @@ function Connect-CrmOnline{             }         })]         [string]$OAuthClientId, - [parameter(Position=3, Mandatory=$true, ParameterSetName="Secret")] + [parameter(Position=3, Mandatory=$false, ParameterSetName="Secret")] [Parameter(Position=6,Mandatory=$false, ParameterSetName="Creds")] + [Parameter(Position=5,Mandatory=$false, ParameterSetName="NoCreds")]         [string]$OAuthRedirectUri, [parameter(Position=4, Mandatory=$true, ParameterSetName="Secret")] - [string]$ClientSecret + [string]$ClientSecret, + [parameter(Position=5, Mandatory=$false, ParameterSetName="NoCreds")] + [string]$Username, + [int]$ConnectionTimeoutInSeconds, + [string]$LogWriteDirectory, + [switch]$BypassTokenCache ) AddTls12Support #make sure tls12 is enabled if ($PSCmdlet.MyInvocation.BoundParameters["Verbose"].IsPresent -eq $true) { Enable-CrmConnectorVerboseLogging } - if($ServerUrl.StartsWith("https://","CurrentCultureIgnoreCase") -ne $true){ + if(-not [string]::IsNullOrEmpty($ServerUrl) -and $ServerUrl.StartsWith("https://","CurrentCultureIgnoreCase") -ne $true){ Write-Verbose "ServerUrl is missing https, fixing URL: https://$ServerUrl" $ServerUrl = "https://" + $ServerUrl } - Write-Verbose "Connecting to: $ServerUrl" - if($ClientSecret){ - $cs = "RequireNewInstance=True" - $cs += ";Url=$ServerUrl" + #starting default connection string with require new instance and server url + $cs = "RequireNewInstance=True" + $cs += ";Url=$ServerUrl" + if($BypassTokenCache){ + $cs += ";TokenCacheStorePath=" + } + + if($ForceDiscovery){ + #SkipDiscovery is true by default and generally not necessary + Write-Verbose "ForceDiscovery: SkipDiscovery=False" + $cs+=";SkipDiscovery=False" + if(-not $Credential){ + Write-Verbose "ForceDiscovery requires a Credential which was not provided - prompting for credential value" + $Credential = Get-Credential + if(-not $Credential){ + #user did not provide a credential - throw + throw "Cannot create the CrmServiceClient with ForceDiscovery as no credentials were provided. Either provide credentials or remove the -ForceDiscovery parameter" + } + } + } + + if($ConnectionString){ + if(!$ConnectionString -or $ConnectionString.Length -eq 0){ + throw "Cannot create the CrmServiceClient, the connection string is null" + } + Write-Verbose "ConnectionString provided - skipping all helpers/known parameters" + + $global:conn = New-Object Microsoft.Xrm.Tooling.Connector.CrmServiceClient -ArgumentList $ConnectionString + if($global:conn){ + ApplyCrmServiceClientObjectTemplate($global:conn) #applyObjectTemplateFormat + } + return $global:conn + } + elseif($ClientSecret){ $cs += ";AuthType=ClientSecret" $cs += ";ClientId=$OAuthClientId" - $cs += ";redirecturi=$OAuthRedirectUri" - $cs += ";SkipDiscovery=True" + if(-not [string]::IsNullOrEmpty($OAuthRedirectUri)){ + $cs += ";redirecturi=$OAuthRedirectUri" + } $cs += ";ClientSecret=$ClientSecret" Write-Verbose ($cs.Replace($ClientSecret, "*******")) try @@ -146,58 +189,80 @@ function Connect-CrmOnline{ } } else{ - $cs = "RequireNewInstance=True" - $cs+= ";Username=$($Credential.UserName)" - $cs+= ";Password=$($Credential.GetNetworkCredential().Password)" - $cs+= ";Url=$ServerUrl" - + if(-not [string]::IsNullOrEmpty($Username)){ + $cs += ";Username=$UserName" + Write-Warning "UserName parameter is only compatible with oAuth, forcing auth mode to oAuth" + $ForceOAuth = $true + } #Default to Office365 Auth, allow oAuth to be used if(!$OAuthClientId -and !$ForceOAuth){ Write-Verbose "Using AuthType=Office365" - $cs += ";AuthType=Office365" + if(-not $Credential){ + #user did not provide a credential + Write-Warning "Cannot create the CrmServiceClient, no credentials were provided. Credentials are required for an AuthType of Office365." + $Credential = Get-Credential + if(-not $Credential){ + throw "Cannot create the CrmServiceClient, no credentials were provided. Credentials are required for an AuthType of Office365." + } + } + $cs+= ";AuthType=Office365" + $cs+= ";Username=$($Credential.UserName)" + $cs+= ";Password=$($Credential.GetNetworkCredential().Password)" } - else{ - Write-Verbose "Params -> ForceOAuth: {$ForceOAuth} ClientId: {$OAuthClientId} RedirectUri: {$OAuthRedirectUri}" - #use the clientid if provided, else use a provided clientid + elseif($ForceOAuth){ + #use oAuth if requested -ForceOAuth + Write-Verbose "Params Provided -> ForceOAuth: {$ForceOAuth} ClientId: {$OAuthClientId} RedirectUri: {$OAuthRedirectUri}" + #try to use the credentials if they're provided + if($Credential){ + Write-Verbose "Using provided credentials for oAuth" + $cs+= ";Username=$($Credential.UserName)" + $cs+= ";Password=$($Credential.GetNetworkCredential().Password)" + }else{ + Write-Verbose "No credential provided, attempting single sign on with no credentials in the connectionstring" + } + if($OAuthClientId){ - Write-Verbose "Using provide " + #use the clientid if provided, else use a provided clientid + Write-Verbose "Using provided oAuth clientid" $cs += ";AuthType=OAuth;ClientId=$OAuthClientId" if($OAuthRedirectUri){ $cs += ";redirecturi=$OAuthRedirectUri" } } else{ + #else fallback to a known clientid $cs+=";AuthType=OAuth;ClientId=2ad88395-b77d-4561-9441-d0e40824f9bc" $cs+=";redirecturi=app://5d3e90d6-aa8e-48a8-8f2c-58b45cc67315" } } - #disable the discovery check by default - if($ForceDiscovery){ - Write-Verbose "ForceDiscovery: SkipDiscovery=False" - $cs+=";SkipDiscovery=False" - } - else{ - Write-Verbose "Default: SkipDiscovery=True" - $cs+=";SkipDiscovery=True" - } + try { if(!$cs -or $cs.Length -eq 0){ throw "Cannot create the CrmServiceClient, the connection string is null" } - Write-Verbose ($cs.Replace($Credential.GetNetworkCredential().Password, "")) + #log the connection string to be helpful + $loggedConnectionString = $cs + if($Credential){ + $loggedConnectionString = $cs.Replace($Credential.GetNetworkCredential().Password, "*******") + } + Write-Verbose "ConnectionString:{$loggedConnectionString}" $global:conn = New-Object Microsoft.Xrm.Tooling.Connector.CrmServiceClient -ArgumentList $cs ApplyCrmServiceClientObjectTemplate($global:conn) #applyObjectTemplateFormat + if($global:conn.LastCrmError -and $global:conn.LastCrmError -match "forbidden with client authentication scheme 'Anonymous'"){ + Write-Error "Warning: Exception encountered when authenticating, if you're using oAuth you might want to include the -username paramter to disambiguate the identity used for authenticate" + } + return $global:conn } catch { throw $_ } - } + } } function Connect-CrmOnPremDiscovery{ @@ -310,7 +375,8 @@ function New-CrmRecord{ [switch]$PreserveCrmRecordId ) - $conn = VerifyCrmConnectionParam $conn + $conn = VerifyCrmConnectionParam -conn $conn -pipelineValue ($PSBoundParameters.ContainsKey('conn')) + $newfields = New-Object 'System.Collections.Generic.Dictionary[[String], [Microsoft.Xrm.Tooling.Connector.CrmDataTypeWrapper]]' @@ -351,7 +417,7 @@ function New-CrmRecord{ { $newfield = New-Object -TypeName 'Microsoft.Xrm.Tooling.Connector.CrmDataTypeWrapper' - $newfield.Type = MapFieldTypeByFieldValue -Value $field.Value + $newfield.Type = MapFieldTypeByFieldValue -Value $fie.Value $newfield.Value = $field.Value $newfields.Add($field.Key, $newfield) @@ -389,7 +455,7 @@ function Get-CrmRecord{ [switch]$IncludeNullValue ) - $conn = VerifyCrmConnectionParam $conn + $conn = VerifyCrmConnectionParam -conn $conn -pipelineValue ($PSBoundParameters.ContainsKey('conn')) if($Fields -eq "*") { @@ -498,7 +564,7 @@ function Set-CrmRecord{ [string]$PrimaryKeyField ) - $conn = VerifyCrmConnectionParam $conn + $conn = VerifyCrmConnectionParam -conn $conn -pipelineValue ($PSBoundParameters.ContainsKey('conn')) if($CrmRecord -ne $null) { @@ -865,7 +931,7 @@ function Remove-CrmRecord{ begin { - $conn = VerifyCrmConnectionParam $conn + $conn = VerifyCrmConnectionParam -conn $conn -pipelineValue ($PSBoundParameters.ContainsKey('conn')) } process { @@ -910,7 +976,7 @@ function Move-CrmRecordToQueue{ [parameter(Mandatory=$false, Position=5)] [bool]$SetWorkingByUser ) - $conn = VerifyCrmConnectionParam $conn + $conn = VerifyCrmConnectionParam -conn $conn -pipelineValue ($PSBoundParameters.ContainsKey('conn')) if($CrmRecord -ne $null) { $EntityLogicalName = $CrmRecord.logicalname @@ -951,7 +1017,7 @@ function Set-CrmRecordOwner{ ) begin { - $conn = VerifyCrmConnectionParam $conn + $conn = VerifyCrmConnectionParam -conn $conn -pipelineValue ($PSBoundParameters.ContainsKey('conn')) } process { @@ -1011,7 +1077,7 @@ function Set-CrmActivityRecordToCloseState{ [parameter(Mandatory=$true, Position=4)] [string]$StatusCode ) - $conn = VerifyCrmConnectionParam $conn + $conn = VerifyCrmConnectionParam -conn $conn -pipelineValue ($PSBoundParameters.ContainsKey('conn')) if($CrmRecord -ne $null) { $ActivityEntityType = $CrmRecord.logicalname @@ -1049,7 +1115,7 @@ function Add-CrmNoteToCrmRecord{ [parameter(Mandatory=$true, Position=4)] [string]$NoteText ) - $conn = VerifyCrmConnectionParam $conn + $conn = VerifyCrmConnectionParam -conn $conn -pipelineValue ($PSBoundParameters.ContainsKey('conn')) if($CrmRecord -ne $null) { $EntityLogicalName = $CrmRecord.logicalname @@ -1101,7 +1167,7 @@ function Add-CrmRecordAssociation{ [parameter(Mandatory=$true, Position=5)] [string]$RelationshipName ) - $conn = VerifyCrmConnectionParam $conn + $conn = VerifyCrmConnectionParam -conn $conn -pipelineValue ($PSBoundParameters.ContainsKey('conn')) if($CrmRecord1 -ne $null) { $EntityLogicalName1 = $CrmRecord1.logicalname @@ -1161,7 +1227,7 @@ function Add-CrmMultiRecordAssociation{ [bool]$IsReflexiveRelationship ) - $conn = VerifyCrmConnectionParam $conn + $conn = VerifyCrmConnectionParam -conn $conn -pipelineValue ($PSBoundParameters.ContainsKey('conn')) if($CrmRecord1 -ne $null) { @@ -1228,7 +1294,7 @@ function Add-CrmActivityToCrmRecord{ ) begin { - $conn = VerifyCrmConnectionParam $conn + $conn = VerifyCrmConnectionParam -conn $conn -pipelineValue ($PSBoundParameters.ContainsKey('conn')) } process { @@ -1289,7 +1355,7 @@ function Remove-CrmRecordAssociation{ [parameter(Mandatory=$true, Position=5)] [string]$RelationshipName ) - $conn = VerifyCrmConnectionParam $conn + $conn = VerifyCrmConnectionParam -conn $conn -pipelineValue ($PSBoundParameters.ContainsKey('conn')) if($CrmRecord1 -ne $null) { $EntityLogicalName1 = $CrmRecord1.logicalname @@ -1349,7 +1415,9 @@ function Invoke-CrmRecordWorkflow{ [parameter(ParameterSetName="CrmRecordWithWorkflowId")] [string]$WorkflowId ) - $conn = VerifyCrmConnectionParam $conn + write-warning "$WorkflowId" + $conn = VerifyCrmConnectionParam -conn $conn -pipelineValue ($PSBoundParameters.ContainsKey('conn')) + if($CrmRecord -ne $null) { $fieldName = $CrmRecord.logicalname + "id" @@ -1364,7 +1432,6 @@ function Invoke-CrmRecordWorkflow{ else{ throw "Cannot determine entities Id attribute" } - } elseif($EntityId -ne $null) { @@ -1434,7 +1501,7 @@ function Get-MyCrmUserId{ [Microsoft.Xrm.Tooling.Connector.CrmServiceClient]$conn ) - $conn = VerifyCrmConnectionParam $conn + $conn = VerifyCrmConnectionParam -conn $conn -pipelineValue ($PSBoundParameters.ContainsKey('conn')) try { @@ -1463,7 +1530,7 @@ function Get-CrmEntityAttributes{ [string]$EntityLogicalName ) - $conn = VerifyCrmConnectionParam $conn + $conn = VerifyCrmConnectionParam -conn $conn -pipelineValue ($PSBoundParameters.ContainsKey('conn')) try { @@ -1493,7 +1560,7 @@ function Get-CrmEntityAllMetadata{ [parameter(Mandatory=$false, Position=2)] [string]$EntityFilters ) - $conn = VerifyCrmConnectionParam $conn + $conn = VerifyCrmConnectionParam -conn $conn -pipelineValue ($PSBoundParameters.ContainsKey('conn')) switch($EntityFilters.ToLower()) { "all" { @@ -1549,7 +1616,7 @@ function Get-CrmEntityAttributeMetadata{ [string]$FieldLogicalName ) - $conn = VerifyCrmConnectionParam $conn + $conn = VerifyCrmConnectionParam -conn $conn -pipelineValue ($PSBoundParameters.ContainsKey('conn')) try { @@ -1585,7 +1652,7 @@ function Get-CrmRecordsByFetch{ [switch]$AllRows ) $elapsed = [System.Diagnostics.Stopwatch]::StartNew() - $conn = VerifyCrmConnectionParam $conn + $conn = VerifyCrmConnectionParam -conn $conn -pipelineValue ($PSBoundParameters.ContainsKey('conn')) #default page number to 1 if not supplied if($PageNumber -eq 0) { @@ -1683,7 +1750,7 @@ function Get-CrmEntityDisplayName{ [parameter(Mandatory=$true, Position=1, ParameterSetName="EntityLogicalName")] [string]$EntityLogicalName ) - $conn = VerifyCrmConnectionParam $conn + $conn = VerifyCrmConnectionParam -conn $conn -pipelineValue ($PSBoundParameters.ContainsKey('conn')) try { $result = $conn.GetEntityDisplayName($EntityLogicalName) @@ -1709,7 +1776,7 @@ function Get-CrmEntityDisplayPluralName{ [parameter(Mandatory=$true, Position=1)] [string]$EntityLogicalName ) - $conn = VerifyCrmConnectionParam $conn + $conn = VerifyCrmConnectionParam -conn $conn -pipelineValue ($PSBoundParameters.ContainsKey('conn')) try { $result = $conn.GetEntityDisplayNamePlural($EntityLogicalName) @@ -1738,7 +1805,7 @@ function Get-CrmEntityMetadata{ [string]$EntityFilters ) - $conn = VerifyCrmConnectionParam $conn + $conn = VerifyCrmConnectionParam -conn $conn -pipelineValue ($PSBoundParameters.ContainsKey('conn')) switch($EntityFilters.ToLower()) { @@ -1795,7 +1862,7 @@ function Get-CrmEntityName{ [int]$EntityTypeCode ) - $conn = VerifyCrmConnectionParam $conn + $conn = VerifyCrmConnectionParam -conn $conn -pipelineValue ($PSBoundParameters.ContainsKey('conn')) try { @@ -1823,7 +1890,7 @@ function Get-CrmEntityTypeCode{ [parameter(Mandatory=$true, Position=1)] [string]$EntityLogicalName ) - $conn = VerifyCrmConnectionParam $conn + $conn = VerifyCrmConnectionParam -conn $conn -pipelineValue ($PSBoundParameters.ContainsKey('conn')) try { $result = $conn.GetEntityTypeCode($EntityLogicalName) @@ -1849,7 +1916,7 @@ function Get-CrmGlobalOptionSet{ [parameter(Mandatory=$true, Position=1)] [string]$OptionSetName ) - $conn = VerifyCrmConnectionParam $conn + $conn = VerifyCrmConnectionParam -conn $conn -pipelineValue ($PSBoundParameters.ContainsKey('conn')) try { $result = $conn.GetGlobalOptionSetMetadata($OptionSetName) @@ -1877,7 +1944,7 @@ function Get-CrmEntityOptionSet{ [parameter(Mandatory=$true, Position=2)] [string]$FieldLogicalName ) - $conn = VerifyCrmConnectionParam $conn + $conn = VerifyCrmConnectionParam -conn $conn -pipelineValue ($PSBoundParameters.ContainsKey('conn')) try { $result = $conn.GetPickListElementFromMetadataEntity($EntityLogicalName, $FieldLogicalName) @@ -1920,7 +1987,7 @@ function Import-CrmSolutionAsync { [parameter(Mandatory=$false, Position=9)] [int64]$PollingDelayInSeconds = 5 ) - $conn = VerifyCrmConnectionParam $conn + $conn = VerifyCrmConnectionParam -conn $conn -pipelineValue ($PSBoundParameters.ContainsKey('conn')) $importId = [guid]::Empty $asyncResponse = $null try @@ -2067,7 +2134,7 @@ function Import-CrmSolution{ [parameter(Mandatory=$false, Position=8)] [switch]$AsyncOperationImportMethod ) - $conn = VerifyCrmConnectionParam $conn + $conn = VerifyCrmConnectionParam -conn $conn -pipelineValue ($PSBoundParameters.ContainsKey('conn')) $importId = [guid]::Empty try { @@ -2254,7 +2321,7 @@ function Merge-CrmHoldingSolutionAsync { [int64]$PollingDelayInSeconds = 5 ) - $conn = VerifyCrmConnectionParam $conn + $conn = VerifyCrmConnectionParam -conn $conn -pipelineValue ($PSBoundParameters.ContainsKey('conn')) $request = New-Object Microsoft.Crm.Sdk.Messages.DeleteAndPromoteRequest $request.UniqueName = $CrmSolutionName @@ -2343,7 +2410,7 @@ function Add-CrmSampleData{ [parameter(Mandatory=$false, Position=0)] [Microsoft.Xrm.Tooling.Connector.CrmServiceClient]$conn ) - $conn = VerifyCrmConnectionParam $conn + $conn = VerifyCrmConnectionParam -conn $conn -pipelineValue ($PSBoundParameters.ContainsKey('conn')) try { $result = $conn.InstallSampleDataToCrm() @@ -2368,7 +2435,7 @@ function Test-CrmSampleDataInstalled{ [Microsoft.Xrm.Tooling.Connector.CrmServiceClient]$conn ) - $conn = VerifyCrmConnectionParam $conn + $conn = VerifyCrmConnectionParam -conn $conn -pipelineValue ($PSBoundParameters.ContainsKey('conn')) try { @@ -2393,7 +2460,7 @@ function Publish-CrmEntity{ [string]$EntityLogicalName ) - $conn = VerifyCrmConnectionParam $conn + $conn = VerifyCrmConnectionParam -conn $conn -pipelineValue ($PSBoundParameters.ContainsKey('conn')) try { @@ -2424,7 +2491,7 @@ function Publish-CrmTheme{ [guid]$ThemeId ) - $conn = VerifyCrmConnectionParam $conn + $conn = VerifyCrmConnectionParam -conn $conn -pipelineValue ($PSBoundParameters.ContainsKey('conn')) try { @@ -2468,7 +2535,7 @@ function Remove-CrmEntityMetadataCache{ [string]$EntityLogicalName ) - $conn = VerifyCrmConnectionParam $conn + $conn = VerifyCrmConnectionParam -conn $conn -pipelineValue ($PSBoundParameters.ContainsKey('conn')) if($EntityLogicalName -eq "") { @@ -2498,7 +2565,7 @@ function Remove-CrmSampleData{ [Microsoft.Xrm.Tooling.Connector.CrmServiceClient]$conn ) - $conn = VerifyCrmConnectionParam $conn + $conn = VerifyCrmConnectionParam -conn $conn -pipelineValue ($PSBoundParameters.ContainsKey('conn')) try { @@ -2533,7 +2600,7 @@ function Set-CrmRecordState{ begin { - $conn = VerifyCrmConnectionParam $conn + $conn = VerifyCrmConnectionParam -conn $conn -pipelineValue ($PSBoundParameters.ContainsKey('conn')) } process @@ -2588,7 +2655,7 @@ function Approve-CrmEmailAddress{ [string]$QueueId ) - $conn = VerifyCrmConnectionParam $conn + $conn = VerifyCrmConnectionParam -conn $conn -pipelineValue ($PSBoundParameters.ContainsKey('conn')) if($UserId -ne "") { @@ -2611,7 +2678,7 @@ function Disable-CrmLanguagePack{ [Int]$LCID ) - $conn = VerifyCrmConnectionParam $conn + $conn = VerifyCrmConnectionParam -conn $conn -pipelineValue ($PSBoundParameters.ContainsKey('conn')) $request = New-Object Microsoft.Crm.Sdk.Messages.DeprovisionLanguageRequest $request.Language = $LCID @@ -2641,7 +2708,7 @@ function Enable-CrmLanguagePack{ [Int]$LCID ) - $conn = VerifyCrmConnectionParam $conn + $conn = VerifyCrmConnectionParam -conn $conn -pipelineValue ($PSBoundParameters.ContainsKey('conn')) $request = New-Object Microsoft.Crm.Sdk.Messages.ProvisionLanguageRequest $request.Language = $LCID @@ -2671,7 +2738,7 @@ function Export-CrmApplicationRibbonXml { [string]$RibbonFilePath ) - $conn = VerifyCrmConnectionParam $conn + $conn = VerifyCrmConnectionParam -conn $conn -pipelineValue ($PSBoundParameters.ContainsKey('conn')) $exportPath = if($RibbonFilePath -ne ""){Get-Item $RibbonFilePath} else {Get-Location} $exportFileName = "applicationRibbon.xml" @@ -2720,7 +2787,7 @@ function Export-CrmEntityRibbonXml { [string]$RibbonFilePath ) - $conn = VerifyCrmConnectionParam $conn + $conn = VerifyCrmConnectionParam -conn $conn -pipelineValue ($PSBoundParameters.ContainsKey('conn')) $exportPath = if($RibbonFilePath -ne ""){Get-Item $RibbonFilePath} else {Get-Location} $exportFileName = $EntityLogicalName + "Ribbon.xml" @@ -2797,7 +2864,7 @@ function Export-CrmSolution{ [switch]$ExportSales ) - $conn = VerifyCrmConnectionParam $conn + $conn = VerifyCrmConnectionParam -conn $conn -pipelineValue ($PSBoundParameters.ContainsKey('conn')) try { @@ -2896,7 +2963,7 @@ function Export-CrmSolutionTranslation{ [string]$TranslationZipFileName ) - $conn = VerifyCrmConnectionParam $conn + $conn = VerifyCrmConnectionParam -conn $conn -pipelineValue ($PSBoundParameters.ContainsKey('conn')) try { @@ -2965,7 +3032,7 @@ function Get-CrmAllLanguagePacks{ [Microsoft.Xrm.Tooling.Connector.CrmServiceClient]$conn ) - $conn = VerifyCrmConnectionParam $conn + $conn = VerifyCrmConnectionParam -conn $conn -pipelineValue ($PSBoundParameters.ContainsKey('conn')) $request = New-Object Microsoft.Crm.Sdk.Messages.RetrieveAvailableLanguagesRequest @@ -2992,7 +3059,7 @@ function Get-CrmEntityRecordCount{ [string]$EntityLogicalName ) - $conn = VerifyCrmConnectionParam $conn + $conn = VerifyCrmConnectionParam -conn $conn -pipelineValue ($PSBoundParameters.ContainsKey('conn')) $count = 0 $query = New-Object -TypeName 'Microsoft.Xrm.Sdk.Query.QueryExpression' @@ -3052,7 +3119,7 @@ function Get-CrmFailedWorkflows{ [switch]$AllRows ) - $conn = VerifyCrmConnectionParam $conn + $conn = VerifyCrmConnectionParam -conn $conn -pipelineValue ($PSBoundParameters.ContainsKey('conn')) $fetch = @" @@ -3114,7 +3181,7 @@ function Get-CrmLicenseSummary{ [Microsoft.Xrm.Tooling.Connector.CrmServiceClient]$conn ) - $conn = VerifyCrmConnectionParam $conn + $conn = VerifyCrmConnectionParam -conn $conn -pipelineValue ($PSBoundParameters.ContainsKey('conn')) $fetch = @" @@ -3145,7 +3212,7 @@ function Get-CrmOrgDbOrgSettings{ [Microsoft.Xrm.Tooling.Connector.CrmServiceClient]$conn ) - $conn = VerifyCrmConnectionParam $conn + $conn = VerifyCrmConnectionParam -conn $conn -pipelineValue ($PSBoundParameters.ContainsKey('conn')) $fetch = @" @@ -3192,7 +3259,7 @@ function Get-CrmRecords{ [parameter(Mandatory=$false, Position=7)] [int]$TopCount ) - $conn = VerifyCrmConnectionParam $conn + $conn = VerifyCrmConnectionParam -conn $conn -pipelineValue ($PSBoundParameters.ContainsKey('conn')) if($FilterOperator -and $FilterOperator.StartsWith("-")) { @@ -3313,7 +3380,7 @@ function Get-CrmRecordsByViewName{ [int]$TopCount ) - $conn = VerifyCrmConnectionParam $conn + $conn = VerifyCrmConnectionParam -conn $conn -pipelineValue ($PSBoundParameters.ContainsKey('conn')) # Escape XML charactor $ViewName = [System.Security.SecurityElement]::Escape($ViewName) @@ -3375,7 +3442,7 @@ function Get-CrmRecordsCount{ [parameter(Mandatory=$true, Position=1)][alias("EntityName")] [string]$EntityLogicalName ) - $conn = VerifyCrmConnectionParam $conn + $conn = VerifyCrmConnectionParam -conn $conn -pipelineValue ($PSBoundParameters.ContainsKey('conn')) $fetch = @" @@ -3413,7 +3480,7 @@ function Get-CrmSdkMessageProcessingStepsForPluginAssembly{ [switch]$OnlyCustomizable ) - $conn = VerifyCrmConnectionParam $conn + $conn = VerifyCrmConnectionParam -conn $conn -pipelineValue ($PSBoundParameters.ContainsKey('conn')) if($OnlyCustomizable){ $isCustom = "1" } else { $isCustom = "01" } @@ -3461,7 +3528,7 @@ function Get-CrmSiteMap{ [string]$SubAreasOfArea ) - $conn = VerifyCrmConnectionParam $conn + $conn = VerifyCrmConnectionParam -conn $conn -pipelineValue ($PSBoundParameters.ContainsKey('conn')) $fetch = @" @@ -3504,7 +3571,7 @@ function Get-CrmSystemSettings{ [switch]$ShowDisplayName ) - $conn = VerifyCrmConnectionParam $conn + $conn = VerifyCrmConnectionParam -conn $conn -pipelineValue ($PSBoundParameters.ContainsKey('conn')) $fetch = @" @@ -3591,7 +3658,7 @@ function Get-CrmTimeZones{ [Microsoft.Xrm.Tooling.Connector.CrmServiceClient]$conn ) - $conn = VerifyCrmConnectionParam $conn + $conn = VerifyCrmConnectionParam -conn $conn -pipelineValue ($PSBoundParameters.ContainsKey('conn')) $fetch = @" @@ -3617,7 +3684,7 @@ function Get-CrmTraceAlerts{ [Microsoft.Xrm.Tooling.Connector.CrmServiceClient]$conn ) - $conn = VerifyCrmConnectionParam $conn + $conn = VerifyCrmConnectionParam -conn $conn -pipelineValue ($PSBoundParameters.ContainsKey('conn')) $fetch = @" @@ -3657,7 +3724,7 @@ function Get-CrmUserMailbox{ [string]$UserId ) - $conn = VerifyCrmConnectionParam $conn + $conn = VerifyCrmConnectionParam -conn $conn -pipelineValue ($PSBoundParameters.ContainsKey('conn')) $fetch = @" @@ -3705,7 +3772,7 @@ function Get-CrmUserPrivileges{ [string]$UserId ) - $conn = VerifyCrmConnectionParam $conn + $conn = VerifyCrmConnectionParam -conn $conn -pipelineValue ($PSBoundParameters.ContainsKey('conn')) # Get User Rolls including Team $roles = Get-CrmUserSecurityRoles -conn $conn -UserId $UserId -IncludeTeamRoles @@ -3801,7 +3868,7 @@ function Get-CrmUserSecurityRoles{ [switch]$IncludeTeamRoles ) - $conn = VerifyCrmConnectionParam $conn + $conn = VerifyCrmConnectionParam -conn $conn -pipelineValue ($PSBoundParameters.ContainsKey('conn')) $roles = New-Object System.Collections.Generic.List[PSObject] @@ -3873,7 +3940,7 @@ function Get-CrmUserSettings{ [string[]]$Fields ) - $conn = VerifyCrmConnectionParam $conn + $conn = VerifyCrmConnectionParam -conn $conn -pipelineValue ($PSBoundParameters.ContainsKey('conn')) return Get-CrmRecord -conn $conn -EntityLogicalName usersettings -Id $UserId -Fields $Fields } @@ -3898,7 +3965,7 @@ function Grant-CrmRecordAccess { ) begin { - $conn = VerifyCrmConnectionParam $conn + $conn = VerifyCrmConnectionParam -conn $conn -pipelineValue ($PSBoundParameters.ContainsKey('conn')) if ($EntityLogicalName) { $CrmRecord += [PSCustomObject] @{ @@ -3940,7 +4007,7 @@ function Import-CrmSolutionTranslation{ [switch]$PublishChanges ) - $conn = VerifyCrmConnectionParam $conn + $conn = VerifyCrmConnectionParam -conn $conn -pipelineValue ($PSBoundParameters.ContainsKey('conn')) try { @@ -3992,7 +4059,7 @@ function Invoke-CrmWhoAmI{ [parameter(Mandatory=$false)] [Microsoft.Xrm.Tooling.Connector.CrmServiceClient]$conn ) - $conn = VerifyCrmConnectionParam $conn + $conn = VerifyCrmConnectionParam -conn $conn -pipelineValue ($PSBoundParameters.ContainsKey('conn')) $request = New-Object Microsoft.Crm.Sdk.Messages.WhoAmIRequest @@ -4038,7 +4105,7 @@ function Invoke-CrmAction { ) begin { - $conn = VerifyCrmConnectionParam $conn + $conn = VerifyCrmConnectionParam -conn $conn -pipelineValue ($PSBoundParameters.ContainsKey('conn')) } process { @@ -4104,7 +4171,7 @@ function Publish-CrmCustomization{ [guid[]]$WebResourceIds ) - $conn = VerifyCrmConnectionParam $conn + $conn = VerifyCrmConnectionParam -conn $conn -pipelineValue ($PSBoundParameters.ContainsKey('conn')) $parameterXml = "" @@ -4180,7 +4247,7 @@ function Publish-CrmAllCustomization{ [Microsoft.Xrm.Tooling.Connector.CrmServiceClient]$conn ) - $conn = VerifyCrmConnectionParam $conn + $conn = VerifyCrmConnectionParam -conn $conn -pipelineValue ($PSBoundParameters.ContainsKey('conn')) $request = New-Object Microsoft.Crm.Sdk.Messages.PublishAllXmlRequest @@ -4215,7 +4282,7 @@ function Add-CrmSecurityRoleToTeam{ [string]$SecurityRoleName ) - $conn = VerifyCrmConnectionParam $conn + $conn = VerifyCrmConnectionParam -conn $conn -pipelineValue ($PSBoundParameters.ContainsKey('conn')) if($SecurityRoleRecord -eq $null -and $SecurityRoleId -eq "" -and $SecurityRoleName -eq "") { @@ -4288,7 +4355,7 @@ function Add-CrmSecurityRoleToUser{ [string]$SecurityRoleName ) - $conn = VerifyCrmConnectionParam $conn + $conn = VerifyCrmConnectionParam -conn $conn -pipelineValue ($PSBoundParameters.ContainsKey('conn')) if($SecurityRoleRecord -eq $null -and $SecurityRoleId -eq "" -and $SecurityRoleName -eq "") { @@ -4359,7 +4426,7 @@ function Remove-CrmSecurityRoleFromTeam{ [string]$SecurityRoleId ) - $conn = VerifyCrmConnectionParam $conn + $conn = VerifyCrmConnectionParam -conn $conn -pipelineValue ($PSBoundParameters.ContainsKey('conn')) if($TeamRecord -ne $null) { @@ -4388,7 +4455,7 @@ function Remove-CrmSecurityRoleFromUser{ [string]$SecurityRoleId ) - $conn = VerifyCrmConnectionParam $conn + $conn = VerifyCrmConnectionParam -conn $conn -pipelineValue ($PSBoundParameters.ContainsKey('conn')) if($SecurityRoleName -ne "") { @@ -4447,7 +4514,7 @@ function Remove-CrmUserManager{ [guid]$UserId ) - $conn = VerifyCrmConnectionParam $conn + $conn = VerifyCrmConnectionParam -conn $conn -pipelineValue ($PSBoundParameters.ContainsKey('conn')) $request = New-Object 'Microsoft.Crm.Sdk.Messages.RemoveParentRequest' $target = New-CrmEntityReference systemuser $UserId @@ -4480,7 +4547,7 @@ function Revoke-CrmEmailAddress{ [string]$QueueId ) - $conn = VerifyCrmConnectionParam $conn + $conn = VerifyCrmConnectionParam -conn $conn -pipelineValue ($PSBoundParameters.ContainsKey('conn')) if($UserId -ne "") { @@ -4510,7 +4577,7 @@ function Revoke-CrmRecordAccess { ) begin { - $conn = VerifyCrmConnectionParam $conn + $conn = VerifyCrmConnectionParam -conn $conn -pipelineValue ($PSBoundParameters.ContainsKey('conn')) if ($EntityLogicalName) { $CrmRecord += [PSCustomObject] @{ @@ -4548,7 +4615,7 @@ function Set-CrmSolutionVersionNumber { [string]$VersionNumber ) - $conn = VerifyCrmConnectionParam $conn + $conn = VerifyCrmConnectionParam -conn $conn -pipelineValue ($PSBoundParameters.ContainsKey('conn')) $solutionRecords = (Get-CrmRecords -conn $conn -EntityLogicalName solution -FilterAttribute uniquename -FilterOperator "like" -FilterValue $SolutionName -Fields uniquename,version ) #if we can't find just one solution matching then ERROR @@ -4592,13 +4659,12 @@ function Set-CrmConnectionCallerId{ [guid]$CallerId ) - $conn = VerifyCrmConnectionParam $conn + $conn = VerifyCrmConnectionParam -conn $conn -pipelineValue ($PSBoundParameters.ContainsKey('conn')) # We may need to check if the CallerId exists and enabled. $conn.OrganizationServiceProxy.CallerId = $CallerId } - function Set-CrmConnectionTimeout{ # .ExternalHelp Microsoft.Xrm.Data.PowerShell.Help.xml [CmdletBinding()] @@ -4611,7 +4677,6 @@ function Set-CrmConnectionTimeout{ [switch]$SetDefault ) - #$conn = VerifyCrmConnectionParam $conn #powershell 4.0+ is required for New-TimeSpan -Seconds $TimeoutInSeconds $newTimeout = New-Object System.TimeSpan -ArgumentList 0,0,120 if(!$SetDefault){ @@ -4641,7 +4706,7 @@ function Set-CrmConnectionTimeout{ Write-Verbose "Failed to set the timeout values" } } - Write-Warning "Please reconnect to CDS or CRM after setting the connection timeout or the new value might not be used in operations." + Write-Warning "Please reconnect to the service after setting the connection timeout or the new timeout will *not* be used for operations." } function Set-CrmSystemSettings { @@ -4868,7 +4933,7 @@ function Set-CrmSystemSettings { [bool]$AllowLegacyClientExperience ) - $conn = VerifyCrmConnectionParam $conn + $conn = VerifyCrmConnectionParam -conn $conn -pipelineValue ($PSBoundParameters.ContainsKey('conn')) $updateFields = @{} @@ -4950,7 +5015,7 @@ function Set-CrmUserBusinessUnit{ [guid]$ReassignUserId ) - $conn = VerifyCrmConnectionParam $conn + $conn = VerifyCrmConnectionParam -conn $conn -pipelineValue ($PSBoundParameters.ContainsKey('conn')) # If ReassignUserId is not passed, then assign them to myself if($ReassignUserId -eq $null) @@ -5010,7 +5075,7 @@ function Set-CrmUserMailbox { [parameter(Mandatory=$false, ParameterSetName="Status")] [switch]$ApproveEmail ) - $conn = VerifyCrmConnectionParam $conn + $conn = VerifyCrmConnectionParam -conn $conn -pipelineValue ($PSBoundParameters.ContainsKey('conn')) $fetch = @" @@ -5108,7 +5173,7 @@ function Set-CrmQueueMailbox { [parameter(Mandatory=$false, ParameterSetName="Status")] [switch]$ApproveEmail ) - $conn = VerifyCrmConnectionParam $conn + $conn = VerifyCrmConnectionParam -conn $conn -pipelineValue ($PSBoundParameters.ContainsKey('conn')) $fetch = @" @@ -5190,7 +5255,7 @@ function Set-CrmUserManager{ [bool]$KeepChildUsers ) - $conn = VerifyCrmConnectionParam $conn + $conn = VerifyCrmConnectionParam -conn $conn -pipelineValue ($PSBoundParameters.ContainsKey('conn')) $request = New-Object 'Microsoft.Crm.Sdk.Messages.SetParentSystemUserRequest' $request.ParentId = $ManagerId @@ -5223,7 +5288,7 @@ function Set-CrmUserSettings{ [PSObject]$CrmRecord ) - $conn = VerifyCrmConnectionParam $conn + $conn = VerifyCrmConnectionParam -conn $conn -pipelineValue ($PSBoundParameters.ContainsKey('conn')) try { @@ -5255,7 +5320,7 @@ function Set-CrmRecordAccess { ) begin { - $conn = VerifyCrmConnectionParam $conn + $conn = VerifyCrmConnectionParam -conn $conn -pipelineValue ($PSBoundParameters.ContainsKey('conn')) if ($EntityLogicalName) { $CrmRecord += [PSCustomObject] @{ @@ -5349,7 +5414,7 @@ function Test-CrmViewPerformance{ [switch]$IsUserView ) - $conn = VerifyCrmConnectionParam $conn + $conn = VerifyCrmConnectionParam -conn $conn -pipelineValue ($PSBoundParameters.ContainsKey('conn')) if($IsUserView) { @@ -5545,10 +5610,12 @@ function VerifyCrmConnectionParam { [CmdletBinding()] PARAM( [parameter(Mandatory=$false)] - [Microsoft.Xrm.Tooling.Connector.CrmServiceClient]$conn + [Microsoft.Xrm.Tooling.Connector.CrmServiceClient]$conn, + [parameter(Mandatory=$false)] + [bool]$pipelineValue ) - - if($conn -eq $null) + #we have a $conn value and we were not given a $conn value so we should try to find one + if($conn -eq $null -and $pipelineValue -eq $false) { $connobj = Get-Variable conn -Scope global -ErrorAction SilentlyContinue if($connobj.Value -eq $null) @@ -5559,6 +5626,8 @@ function VerifyCrmConnectionParam { { $conn = $connobj.Value } + }elseif($conn -eq $null -and $pipelineValue -eq $true){ + throw "Connection object provided is null" } return $conn } @@ -5655,7 +5724,15 @@ function AddTls12Support { [System.Net.ServicePointManager]::SecurityProtocol = [System.Net.SecurityProtocolType]::Tls -bor [System.Net.SecurityProtocolType]::Tls12 } function Enable-CrmConnectorVerboseLogging { + [CmdletBinding()] + PARAM( + [parameter(Mandatory=$false)] + [string]$filePath + ) $logfilename = "Microsoft.Xrm.Tooling.Connector.Verbose.log" + if(-not [string]::IsNullOrEmpty($filePath)){ + $logfilename = "$filePath\$logfilename" + } Write-Verbose "Enabling Microsoft.Xrm.Tooling.Connector verbose logging to $logfilename" [Microsoft.Xrm.Tooling.Connector.TraceControlSettings]::TraceLevel = [System.Diagnostics.SourceLevels]::All if(-not [Microsoft.Xrm.Tooling.Connector.TraceControlSettings]::AddTraceListener((New-Object System.Diagnostics.TextWriterTraceListener -ArgumentList $logfilename))){ @@ -5693,7 +5770,8 @@ function ApplyCrmServiceClientObjectTemplate { 'CallerAADObjectId', 'DisableCrossThreadSafeties', 'SessionTrackingId', - 'ForceServerMetadataCacheConsistency' + 'ForceServerMetadataCacheConsistency', + 'LastCrmError' ) $defaultPropsSetCrmServiceClient=New-Object System.Management.Automation.PSPropertySet('DefaultDisplayPropertySet',[string[]]$defaultPropsCrmServiceClient) $PSStandardMembers = [System.Management.Automation.PSMemberInfo[]]@($defaultPropsSetCrmServiceClient) diff --git a/Microsoft.Xrm.Data.PowerShell/Microsoft.Xrm.Tooling.Connector.dll b/Microsoft.Xrm.Data.PowerShell/Microsoft.Xrm.Tooling.Connector.dll index 7e94be5..91bd75e 100644 Binary files a/Microsoft.Xrm.Data.PowerShell/Microsoft.Xrm.Tooling.Connector.dll and b/Microsoft.Xrm.Data.PowerShell/Microsoft.Xrm.Tooling.Connector.dll differ diff --git a/Microsoft.Xrm.Data.PowerShell/Microsoft.Xrm.Tooling.CrmConnectControl.dll b/Microsoft.Xrm.Data.PowerShell/Microsoft.Xrm.Tooling.CrmConnectControl.dll index 40f3f46..bef0d2c 100644 Binary files a/Microsoft.Xrm.Data.PowerShell/Microsoft.Xrm.Tooling.CrmConnectControl.dll and b/Microsoft.Xrm.Data.PowerShell/Microsoft.Xrm.Tooling.CrmConnectControl.dll differ diff --git a/Microsoft.Xrm.Data.PowerShell/Microsoft.Xrm.Tooling.CrmConnector.Powershell.dll b/Microsoft.Xrm.Data.PowerShell/Microsoft.Xrm.Tooling.CrmConnector.Powershell.dll index ba0e386..bd28d43 100644 Binary files a/Microsoft.Xrm.Data.PowerShell/Microsoft.Xrm.Tooling.CrmConnector.Powershell.dll and b/Microsoft.Xrm.Data.PowerShell/Microsoft.Xrm.Tooling.CrmConnector.Powershell.dll differ diff --git a/Microsoft.Xrm.Data.PowerShell/Microsoft.Xrm.Tooling.Ui.Styles.dll b/Microsoft.Xrm.Data.PowerShell/Microsoft.Xrm.Tooling.Ui.Styles.dll index 2338bd4..35b5c34 100644 Binary files a/Microsoft.Xrm.Data.PowerShell/Microsoft.Xrm.Tooling.Ui.Styles.dll and b/Microsoft.Xrm.Data.PowerShell/Microsoft.Xrm.Tooling.Ui.Styles.dll differ diff --git a/Microsoft.Xrm.Data.PowerShell/Newtonsoft.Json.dll b/Microsoft.Xrm.Data.PowerShell/Newtonsoft.Json.dll index e5f5647..866f5b8 100644 Binary files a/Microsoft.Xrm.Data.PowerShell/Newtonsoft.Json.dll and b/Microsoft.Xrm.Data.PowerShell/Newtonsoft.Json.dll differ