diff --git a/Microsoft.Xrm.Data.PowerShell/Microsoft.Xrm.Data.PowerShell.Help (2).pshproj b/Microsoft.Xrm.Data.PowerShell/Microsoft.Xrm.Data.PowerShell.Help (2).pshproj
deleted file mode 100644
index b45e857..0000000
--- a/Microsoft.Xrm.Data.PowerShell/Microsoft.Xrm.Data.PowerShell.Help (2).pshproj
+++ /dev/null
@@ -1,10536 +0,0 @@
-
-
- Microsoft.Xrm.Data.PowerShell
- 2.8.12
-
- true
- false
-
-
-
- Add-CrmActivityToCrmRecord
-
- Add-CrmActivityToCrmRecord [-conn <CrmServiceClient>] [-CrmRecord] <PSObject> [-ActivityEntityType] <String> [-Subject] <String> [-Description] <String> [-OnwerUserId] <String> [[-Fields] <Hashtable>]
- Add-CrmActivityToCrmRecord [-conn <CrmServiceClient>] [-EntityLogicalName] <String> [-Id] <Guid> [-ActivityEntityType] <String> [-Subject] <String> [-Description] <String> [-OnwerUserId] <String> [[-Fields] <Hashtable>]
-
-
- Create a new activity to a record.
- The Add-CrmActivityToCrmRecord cmdlet lets you add an activity to a record. You use ActivityEntityType to specify Activity Type and Subject/Description to set values.
-You can use Fields optional Parameter to specify additional Field values. Use @{"field logical name"="value"} syntax to create Fields , and make sure you specify correct type of value for the field.
-You can use Get-CrmEntityAttributeMetadata cmdlet and check AttributeType to see the field type. In addition, for CRM specific types, you can use New-CrmMoney, New-CrmOptionSetValue or New-CrmEntityReference cmdlets.
-
-There are two ways to specify a target record.
-
-1. Pass EntityLogicalName and record's Id.
-2. Get a record object by using Get-CrmRecord/Get-CrmRecords cmdlets, and pass it.
-
-You can specify note subject and body by using -Subject and -NoteText parameters.
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- conn
-
- System.Management.Automation.ParameterAttribute
- System.Management.Automation.ArgumentTypeConverterAttribute
-
-
- A connection to your CRM organization. Use $conn = Get-CrmConnection <Parameters> to generate it.
-
-
-
- CrmRecord
-
- System.Management.Automation.ParameterAttribute
- System.Management.Automation.ArgumentTypeConverterAttribute
-
-
- A record object which is obtained via Get-CrmRecord/Get-CrmRecords. When you pass CrmRecord, then you don't use EntityLogicalName/Id.
-
-
-
- ActivityEntityType
-
- System.Management.Automation.ParameterAttribute
- System.Management.Automation.ArgumentTypeConverterAttribute
-
-
- A logicalname for an Activity Entity to add. i.e.)phonecall, email, task, etc..
-
-
-
- Subject
-
- System.Management.Automation.ParameterAttribute
- System.Management.Automation.ArgumentTypeConverterAttribute
-
-
- Subject of the activity record.
-
-
-
- Description
-
- System.Management.Automation.ParameterAttribute
- System.Management.Automation.ArgumentTypeConverterAttribute
-
-
- Description of the activity record.
-
-
-
- OnwerUserId
-
- System.Management.Automation.ParameterAttribute
- System.Management.Automation.ArgumentTypeConverterAttribute
-
-
-
-
-
-
- Fields
-
- System.Management.Automation.ParameterAttribute
- System.Management.Automation.ArgumentTypeConverterAttribute
-
-
- A List of field name/value pair. Use @{"field logical name"="value"} syntax to create Fields, and make sure you specify correct type of value for the field.
-You can use Get-CrmEntityAttributeMetadata cmdlet and check AttributeType to see the field type. In addition, for CRM specific types, you can use New-CrmMoney, New-CrmOptionSetValue or New-CrmEntityReference cmdlets.
-
-
-
- EntityLogicalName
-
- System.Management.Automation.ParameterAttribute
- System.Management.Automation.ArgumentTypeConverterAttribute
-
-
- A logicalname of the target record. i.e.)account, contact, lead, etc..
-
-
-
- Id
-
- System.Management.Automation.ParameterAttribute
- System.Management.Automation.ArgumentTypeConverterAttribute
-
-
- An Id (guid) of the record.
-
-
-
-
-
- Example 1
- Add-CrmActivityToCrmRecord -conn $conn -EntityLogicalName account -Id feff5970-6317-e511-80da-c4346bc43d94 -ActivityEntityType task -Subject "sample task" -Description "sample task description" -OnwerUserId f9d40920-7a43-4f51-9749-0549c4caf67d
- This example adds a task an account record.
-
-
-
- Example 2
- Add-CrmActivityToCrmRecord account feff5970-6317-e511-80da-c4346bc43d94 task "sample task" "sample task description" f9d40920-7a43-4f51-9749-0549c4caf67d
- This example adds a task to an account record by omitting parameters names.
-When omitting parameter names, you do not provide $conn, cmdlets automatically finds it.
-
-
-
- Example 3
- Add-CrmActivityToCrmRecord account feff5970-6317-e511-80da-c4346bc43d94 task "sample task" "sample task description" f9d40920-7a43-4f51-9749-0549c4caf67d @{"scheduledend"=(Get-Date).AddDays(3);"prioritycode"=New-CrmOptionSetValue 2}
- This example adds a task to an account record with Due Date and Priority fields.
-
-
-
- Example 4
- PS C:\>$account = Get-CrmRecord account feff5970-6317-e511-80da-c4346bc43d94 name
-
-PS C:\>user = Get-MyCrmUserId
-
-PS C:\>Add-CrmActivityToCrmRecord $account task "sample task" "sample task description" $user
- This example retrieves and stores an account, and login user Id (guid) to variables. Then passes them to Add-CrmActivityToCrmRecord.
-
-
-
-
-
- false
-
-
- Add-CrmMultiRecordAssociation
-
- Add-CrmMultiRecordAssociation [-conn <CrmServiceClient>] [-CrmRecord1] <PSObject> [-CrmRecord2s] <PSObject[]> [-RelationshipName] <String> [[-IsReflexiveRelationship] <Boolean>]
- Add-CrmMultiRecordAssociation [-conn <CrmServiceClient>] [-EntityLogicalName1] <String> [-Id1] <Guid> [-EntityLogicalName2] <String> [-Id2s] <Guid[]> [-RelationshipName] <String> [[-IsReflexiveRelationship] <Boolean>]
-
-
- Associates multiple records to single record for N:N relationship.
- The Add-CrmMultiRecordAssociation cmdlet lets you associate multiple records to single record for N:N relationship by specifying relatioship logical name.
-Use @('<object>','<object>') syntax to specify multiple ids or records.
-if the relationship is self-referencing, specify $True for -IsReflexiveRelationship Parameter.
-
-There are two ways to specify records.
-
-1. Pass EntityLogicalName and record's Id for both records.
-2. Get record object(s) by using Get-CrmRecord/Get-CrmRecords cmdlets, and pass them.
-
-You can specify relationship logical name for the association.
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- conn
-
- System.Management.Automation.ParameterAttribute
- System.Management.Automation.ArgumentTypeConverterAttribute
-
-
- A connection to your CRM organization. Use $conn = Get-CrmConnection <Parameters> to generate it.
-
-
-
- CrmRecord1
-
- System.Management.Automation.ParameterAttribute
- System.Management.Automation.ArgumentTypeConverterAttribute
-
-
- A first record object which is obtained via Get-CrmRecord/Get-CrmRecords. When you pass CrmRecord, then you don't use EntityLogicalName/Id.
-
-
-
- CrmRecord2s
-
- System.Management.Automation.ParameterAttribute
- System.Management.Automation.ArgumentTypeConverterAttribute
-
-
- An array of records object which are obtained via Get-CrmRecord/Get-CrmRecords. When you pass CrmRecord, then you don't use EntityLogicalName/Id.
-
-
-
- RelationshipName
-
- System.Management.Automation.ParameterAttribute
- System.Management.Automation.ArgumentTypeConverterAttribute
-
-
- A N:N relationship logical name.
-
-
-
- IsReflexiveRelationship
-
- System.Management.Automation.ParameterAttribute
- System.Management.Automation.ArgumentTypeConverterAttribute
-
-
- Specify $True if the N:N relationship is self-referencing.
-
-
-
- EntityLogicalName1
-
- System.Management.Automation.ParameterAttribute
- System.Management.Automation.ArgumentTypeConverterAttribute
-
-
- A logicalname for first Entity. i.e.)account, contact, lead, etc..
-
-
-
- Id1
-
- System.Management.Automation.ParameterAttribute
- System.Management.Automation.ArgumentTypeConverterAttribute
-
-
- An Id (guid) of first record
-
-
-
- EntityLogicalName2
-
- System.Management.Automation.ParameterAttribute
- System.Management.Automation.ArgumentTypeConverterAttribute
-
-
- A logicalname for second Entity. i.e.)account, contact, lead, etc..
-
-
-
- Id2s
-
- System.Management.Automation.ParameterAttribute
- System.Management.Automation.ArgumentTypeConverterAttribute
-
-
- An array of Ids (guid) of second records. Specify by using @('66005a70-6317-e511-80da-c4346bc43d94','62005a70-6317-e511-80da-c4346bc43d94') syntax.
-
-
-
-
-
- Example 1
- Add-CrmMultiRecordAssociation -conn $conn -EntityLogicalName1 account -Id1 00005a70-6317-e511-80da-c4346bc43d94 -EntityLogicalName2 contact -Id2s @('66005a70-6317-e511-80da-c4346bc43d94','62005a70-6317-e511-80da-c4346bc43d94') -RelationshipName new_accounts_contacts
-
- This example associates an account and two contact records through new_accounts_contacts custom N:N relationship.
-
-
-
- Example 2
- Add-CrmMultiRecordAssociation account 00005a70-6317-e511-80da-c4346bc43d94 contact @('66005a70-6317-e511-80da-c4346bc43d94','62005a70-6317-e511-80da-c4346bc43d94') new_accounts_contacts
- This example associates an account and two contact records through new_accounts_contacts custom N:N relationship by omitting parameters names.
-When omitting parameter names, you do not provide $conn, cmdlets automatically finds it.
-
-
-
- Example 3
- PS C:\>$account = Get-CrmRecord account 00005a70-6317-e511-80da-c4346bc43d94 name
-
-PS C:\>$fetch = @"
-<fetch version="1.0" output-format="xml-platform" mapping="logical" distinct="false" no-lock="true">
-<entity name="contact">
-<attribute name="fullname" />
-<filter type="and">
- <condition attribute="lastname" operator="like" value="%sample%" />
-</filter>
-</entity>
-</fetch>
-"@
-
-PS C:\>$contacts = Get-CrmRecordsByFetch $fetch
-
-PS C:\>Add-CrmMultiRecordAssociation $account $contacts.CrmRecords new_accounts_contacts
- This example retrieves contacts by using FetchXML and stores to a variable, then retrieves and store an account record to another variable.
-Then passes those variables Add-CrmMultiRecordAssociation.
-
-
-
-
-
- false
-
-
- Add-CrmRecordAssociation
-
- Add-CrmRecordAssociation [-conn <CrmServiceClient>] [-CrmRecord1] <PSObject> [-CrmRecord2] <PSObject> [-RelationshipName] <String>
- Add-CrmRecordAssociation [-conn <CrmServiceClient>] [-EntityLogicalName1] <String> [-Id1] <Guid> [-EntityLogicalName2] <String> [-Id2] <Guid> [-RelationshipName] <String>
-
-
- Associates two records for N:N relationship.
- The Add-CrmRecordAssociation cmdlet lets you associate two records for N:N relationship by specifying relatioship logical name.
-
-There are two ways to specify records.
-1. Pass EntityLogicalName and record's Id for both records.
-2. Get a record object by using Get-CrmRecord/Get-CrmRecords cmdlets, and pass it for both records.
-
-You can specify relationship logical name for the association.
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- conn
-
- System.Management.Automation.ParameterAttribute
- System.Management.Automation.ArgumentTypeConverterAttribute
-
-
- A connection to your CRM organization. Use $conn = Get-CrmConnection <Parameters> to generate it.
-
-
-
- CrmRecord1
-
- System.Management.Automation.ParameterAttribute
- System.Management.Automation.ArgumentTypeConverterAttribute
-
-
- A first record object which is obtained via Get-CrmRecord/Get-CrmRecords. When you pass CrmRecord, then you don't use EntityLogicalName/Id.
-
-
-
- CrmRecord2
-
- System.Management.Automation.ParameterAttribute
- System.Management.Automation.ArgumentTypeConverterAttribute
-
-
- A second record object which is obtained via Get-CrmRecord/Get-CrmRecords. When you pass CrmRecord, then you don't use EntityLogicalName/Id.
-
-
-
- RelationshipName
-
- System.Management.Automation.ParameterAttribute
- System.Management.Automation.ArgumentTypeConverterAttribute
-
-
- A N:N relationship logical name.
-
-
-
- EntityLogicalName1
-
- System.Management.Automation.ParameterAttribute
- System.Management.Automation.ArgumentTypeConverterAttribute
-
-
- A logicalname for first Entity. i.e.)accout, contact, lead, etc..
-
-
-
- Id1
-
- System.Management.Automation.ParameterAttribute
- System.Management.Automation.ArgumentTypeConverterAttribute
-
-
- An Id (guid) of first record
-
-
-
- EntityLogicalName2
-
- System.Management.Automation.ParameterAttribute
- System.Management.Automation.ArgumentTypeConverterAttribute
-
-
- A logicalname for second Entity. i.e.)accout, contact, lead, etc..
-
-
-
- Id2
-
- System.Management.Automation.ParameterAttribute
- System.Management.Automation.ArgumentTypeConverterAttribute
-
-
- An Id (guid) of second record
-
-
-
-
-
- Example 1
- Add-CrmRecordAssociation -conn $conn -EntityLogicalName1 account -Id1 00005a70-6317-e511-80da-c4346bc43d94 -EntityLogicalName2 contact -Id2 66005a70-6317-e511-80da-c4346bc43d94 -RelationshipName new_accounts_contacts
- This example associates an account and a contact records through new_accounts_contacts custom N:N relationship.
-
-
-
- Example 2
- Add-CrmRecordAssociation account 00005a70-6317-e511-80da-c4346bc43d94 contact 66005a70-6317-e511-80da-c4346bc43d94 new_accounts_contacts
- This example associates an account and a contact records through new_accounts_contacts custom N:N relationship by ommiting parameters names.
-When ommiting parameter names, you do not provide $conn, cmdlets automatically finds it.
-
-
-
- Example 3
- PS C:\>$account = Get-CrmRecord account 00005a70-6317-e511-80da-c4346bc43d94 name
-
-PS C:\>$contact = Get-CrmRecord contact 66005a70-6317-e511-80da-c4346bc43d94 fullname
-
-PS C:\>Add-CrmRecordAssociation -conn $conn -CrmRecord1 $account -CrmRecord2 $contact -RelationshipName new_accounts_contacts
- This example retrieves and stores an account and a contact records to variables, then pass them to Add-CrmRecordAssociation cmdlets.
-
-
-
- Example 4
- PS C:\>$account = Get-CrmRecord account 00005a70-6317-e511-80da-c4346bc43d94 name
-
-PS C:\>$contact = Get-CrmRecord contact 66005a70-6317-e511-80da-c4346bc43d94 fullname
-
-PS C:\>Add-CrmRecordAssociation $account $contact new_accounts_contacts
- This example retrieves and stores an account and a contact records to variables, then pass them to Add-CrmRecordAssociation cmdlets.
-
-
-
-
-
- false
-
-
- Add-CrmSampleData
-
- Add-CrmSampleData [[-conn] <CrmServiceClient>]
-
-
- Add sample data CRM Organization.
-
- The Add-CrmSampleData cmdlet lets you add sample data to CRM Organization and returns Job Id. You can confirm the status by using Test-CrmSampleDataInstalled cmdlet.
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- conn
-
- System.Management.Automation.ParameterAttribute
- System.Management.Automation.ArgumentTypeConverterAttribute
-
-
- A connection to your CRM organization. Use $conn = Get-CrmConnection <Parameters> to generate it.
-
-
-
-
-
-
- Example 1
- Add-CrmSampleData -conn $conn
-
- This example adds sample data, it returns the import job ID of the sample data import.
-
-
-
- Example 2
- Add-CrmSampleData
- This example adds sample data by omitting parameter names.
-When omitting parameter names, you do not provide $conn, cmdlets automatically finds it.
-It returns the import job ID of the sample data import.
-
-
-
-
-
- false
-
-
- Add-CrmSecurityRoleToTeam
-
- Add-CrmSecurityRoleToTeam [-conn <CrmServiceClient>] [-TeamRecord] <PSObject> [[-SecurityRoleRecord] <PSObject>] [[-SecurityRoleName] <String>]
- Add-CrmSecurityRoleToTeam [-conn <CrmServiceClient>] [-TeamId] <String> [[-SecurityRoleId] <String>] [[-SecurityRoleName] <String>]
-
-
- Assigns a security role to a team.
- The Add-CrmSecurityRoleToTeam cmdlet lets you assign a security role to a team.
-
-There are two ways to specify records.
-
-1. Pass record's Id for both records.
-2. Get a record object by using Get-CrmRecord/Get-CrmRecords cmdlets, and pass it for both records.
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- conn
-
- System.Management.Automation.ParameterAttribute
- System.Management.Automation.ArgumentTypeConverterAttribute
-
-
- A connection to your CRM organization. Use $conn = Get-CrmConnection <Parameters> to generate it.
-
-
-
-
- TeamRecord
-
- System.Management.Automation.ParameterAttribute
- System.Management.Automation.ArgumentTypeConverterAttribute
-
-
- A team record object which is obtained via Get-CrmRecord/Get-CrmRecords. When you pass CrmRecord, then you don't use UserId.
-
-
-
-
- SecurityRoleRecord
-
- System.Management.Automation.ParameterAttribute
- System.Management.Automation.ArgumentTypeConverterAttribute
-
-
- A security role record object which is obtained via Get-CrmRecord/Get-CrmRecords. When you pass CrmRecord, then you don't use SecurityRoleId.
-
-
-
-
- SecurityRoleName
-
- System.Management.Automation.ParameterAttribute
- System.Management.Automation.ArgumentTypeConverterAttribute
-
-
- A name of security role record
-
-
-
-
- TeamId
-
- System.Management.Automation.ParameterAttribute
- System.Management.Automation.ArgumentTypeConverterAttribute
-
-
- An Id (guid) of team record
-
-
-
-
- SecurityRoleId
-
- System.Management.Automation.ParameterAttribute
- System.Management.Automation.ArgumentTypeConverterAttribute
-
-
- An Id (guid) of security role record
-
-
-
-
-
-
- Example 1
- Add-CrmSecurityRoleToTeam -conn $conn -TeamId 00005a70-6317-e511-80da-c4346bc43d94 -SecurityRoleId 66005a70-6317-e511-80da-c4346bc43d94
-
- This example assigns the security role to the team by using Id.
-
-
-
-
- Example 2
- Add-CrmSecurityRoleToTeam 00005a70-6317-e511-80da-c4346bc43d94 66005a70-6317-e511-80da-c4346bc43d94
-
- This example assigns the security role to the team by using Id by omitting parameters names.
-When omitting parameter names, you do not provide $conn, cmdlets automatically finds it.
-
-
-
- Example 3
- PS C:\>$team = Get-CrmRecord team 00005a70-6317-e511-80da-c4346bc43d94 name
-PS C:\>$role = Get-CrmRecord role 66005a70-6317-e511-80da-c4346bc43d94 name
-PS C:\>Add-CrmSecurityRoleToTeam $team $role
- This example assigns the security role to the team by using record objects.
-
-
-
-
- Example 4
- Add-CrmSecurityRoleToUser -conn $conn -TeamId 00005a70-6317-e511-80da-c4346bc43d94 -SecurityRoleName "salesperson"
-
- This example assigns the salesperson role to the team by using Id and role name.
-
-
-
-
-
-
- false
-
-
- Add-CrmSecurityRoleToUser
-
- Add-CrmSecurityRoleToUser [-conn <CrmServiceClient>] [-UserRecord] <PSObject> [[-SecurityRoleRecord] <PSObject>]
- Add-CrmSecurityRoleToUser [-conn <CrmServiceClient>] [-UserId] <String> [[-SecurityRoleId] <String>]
-
-
- Assigns a security role to a user.
-
- The Add-CrmSecurityRoleToUser cmdlet lets you assign a security role to a user.
-There are two ways to specify records.
-
-1. Pass record's Id for both records.
-2. Get a record object by using Get-CrmRecord/Get-CrmRecords cmdlets, and pass it for both records.
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- conn
-
- System.Management.Automation.ParameterAttribute
- System.Management.Automation.ArgumentTypeConverterAttribute
-
-
- A connection to your CRM organization. Use $conn = Get-CrmConnection <Parameters> to generate it.
-
-
-
-
- UserRecord
-
- System.Management.Automation.ParameterAttribute
- System.Management.Automation.ArgumentTypeConverterAttribute
-
-
- A user record object which is obtained via Get-CrmRecord/Get-CrmRecords. When you pass CrmRecord, then you don't use UserId.
-
-
-
-
- SecurityRoleRecord
-
- System.Management.Automation.ParameterAttribute
- System.Management.Automation.ArgumentTypeConverterAttribute
-
-
- A security role record object which is obtained via Get-CrmRecord/Get-CrmRecords. When you pass CrmRecord, then you don't use SecurityRoleId.
-
-
-
-
- UserId
-
- System.Management.Automation.ParameterAttribute
- System.Management.Automation.ArgumentTypeConverterAttribute
-
-
- An Id (guid) of user record
-
-
-
-
- SecurityRoleId
-
- System.Management.Automation.ParameterAttribute
- System.Management.Automation.ArgumentTypeConverterAttribute
-
-
- An Id (guid) of security role record
-
-
-
-
-
-
- Example 1
- Add-CrmSecurityRoleToUser -conn $conn -UserId 00005a70-6317-e511-80da-c4346bc43d94 -SecurityRoleId 66005a70-6317-e511-80da-c4346bc43d94
-
- This example assigns the security role to the user by using Id.
-
-
-
-
- Example 2
- Add-CrmSecurityRoleToUser 00005a70-6317-e511-80da-c4346bc43d94 66005a70-6317-e511-80da-c4346bc43d94
-
- This example assigns the security role to the user by using Id by omitting parameters names.
-When omitting parameter names, you do not provide $conn, cmdlets automatically finds it.
-
-
-
- Example 3
- PS C:\>$user = Get-CrmRecord sysetmuser 00005a70-6317-e511-80da-c4346bc43d94 fullname
-PS C:\>$role = Get-CrmRecord role 66005a70-6317-e511-80da-c4346bc43d94 name
-PS C:\>Add-CrmSecurityRoleToUser $user $role
- This example assigns the security role to the user by using record objects.
-
-
-
-
- Example 4
- Add-CrmSecurityRoleToUser -conn $conn -UserId 00005a70-6317-e511-80da-c4346bc43d94 -SecurityRoleName "salesperson"
-
- This example assigns the salesperson role to the user by using Id and role name.
-
-
-
-
-
-
- false
-
-
- Approve-CrmEmailAddress
-
- Approve-CrmEmailAddress [-conn <CrmServiceClient>] [-UserId] <String>
- Approve-CrmEmailAddress [-conn <CrmServiceClient>] [-QueueId] <String>
-
-
- Approve email address change of a user or a queue.
-
- The Approve-CrmEmailAddress cmdlet lets you approves email address change of a user or a queue.
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- conn
-
- System.Management.Automation.ParameterAttribute
- System.Management.Automation.ArgumentTypeConverterAttribute
-
-
- A connection to your CRM organization. Use $conn = Get-CrmConnection <Parameters> to generate it.
-
-
-
-
- UserId
-
- System.Management.Automation.ParameterAttribute
- System.Management.Automation.ArgumentTypeConverterAttribute
-
-
- A record Id of User.
-
-
-
-
- QueueId
-
- System.Management.Automation.ParameterAttribute
- System.Management.Automation.ArgumentTypeConverterAttribute
-
-
- A record Id of Queue.
-
-
-
-
-
-
- Example 1
- Approve-CrmEmailAddress -conn $conn -UserId 00005a70-6317-e511-80da-c4346bc43d94
-
- This example approves email address for a user.
-
-
-
-
- Example 2
- Approve-CrmEmailAddress -UserId 00005a70-6317-e511-80da-c4346bc43d94
-
- This example approves email address for a user by omitting parameters names.
-When omitting parameter names, you do not provide $conn, cmdlets automatically finds it.
-
-
-
- Example 3
- Approve-CrmEmailAddress -conn $conn -QueueId 00005a70-6317-e511-80da-c4346bc43d94
-
- This example approves email address for a queue.
-
-
-
-
-
-
- false
-
-
- Connect-CrmOnline
-
- 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.
- The Connect-CrmOnline cmdlet lets you connect to CRM Online organization without using Discovery Service.
-You can use Get-Credential to create Credential information.
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Credential
-
- System.Management.Automation.ParameterAttribute
- System.Management.Automation.CredentialAttribute
- System.Management.Automation.ArgumentTypeConverterAttribute
-
-
- A PS-Credential. You can invoke Get-Credential.
- Get-Credential
-
-
- ServerUrl
-
- 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
-
-
- 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. 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
-
-
- Azure Active Directory Redirect Uri (Must match the Applications redirect uri)
-
-
-
- ClientSecret
-
- System.Management.Automation.ParameterAttribute
- System.Management.Automation.ArgumentTypeConverterAttribute
-
-
- 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 Office365 legacy authentication
- PS C:\> Connect-CrmOnline -Credential (Get-Credential) -ServerUrl "https://contoso.crm.dynamics.com"
- Connect to online using your organization URL
-
-
-
- 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 attempting single sign on - sign on using ADAL and the browser is attempted when a credential is not provided.
-
-
-
- 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.
-
-
-
- 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
-
-
-
- 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.
-
-
-
-
-
- false
-
-
- Connect-CrmOnlineDiscovery
-
- Connect-CrmOnlineDiscovery [[-Credential] <PSCredential>] [-InteractiveMode]
-
-
- Retrieves all CRM Online Organization you belong to, let you select which organization to login, then returns connection information.
- The Connect-CrmOnlineDiscovery cmdlet lets you retrieves all CRM Online Organization you belong to, let you select which organization to login, then returns connection information.
-
-You can use Get-Credential to create Credential information, or you can simply invoke Connect-CrmOnlineDiscovery which prompts you to enter username/password.
-
-
-
-
-
-
-
-
-
-
-
-
-
- Credential
-
- System.Management.Automation.ParameterAttribute
- System.Management.Automation.CredentialAttribute
- System.Management.Automation.ArgumentTypeConverterAttribute
-
-
- A PS-Credential. You can invoke Get-Credential.
-
-
-
- InteractiveMode
-
- System.Management.Automation.ParameterAttribute
- System.Management.Automation.ArgumentTypeConverterAttribute
-
-
- Switch to launch a wpf dialog to discover and connect to CRM Online instances.
-
-
-
-
-
- Default
- PS C:\> Connect-CrmOnlineDiscovery
- This example prompts you to enter username/password, displays all CRM organization, and returns connection.
-
-
-
- Credential Provided
- PS C:\>$cred = Get-Credential
-PS C:\>Connect-CrmOnlineDiscovery $cred
-
-
-
-
- This example displays all CRM organization, and returns connection.
-
-
-
- Interactive
- PS C:\>Connect-CrmOnlineDiscovery -InteractiveMode
- IsReady : True
- IsBatchOperationsAvailable : True
- OrganizationServiceProxy : Microsoft.Xrm.Tooling.Connector.CrmWebSvc+ManagedTokenOrganizationServiceProxy
- LastCrmError :
- LastCrmException :
- CrmConnectOrgUriActual : https://contoso.api.crm.dynamics.com/XRMServices/2011/Organization.svc
- ConnectedOrgFriendlyName : contoso
- ConnectedOrgUniqueName : contoso
- 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 : 7.1.0.1086
-
-
-
-
-
- false
-
-
- Connect-CrmOnPremDiscovery
-
- Connect-CrmOnPremDiscovery [-Credential <PSCredential>] -ServerUrl <Uri> [-OrganizationName <String>] [-HomeRealmUrl <String>]
- Connect-CrmOnPremDiscovery [-InteractiveMode]
-
-
- Retrieves all CRM OnPrem orgs you belong to, let you select which organization to login, then returns connection information.
- The Connect-CrmOnPremDiscovery cmdlet lets you retrieve all CRM OnPrem Organization you belong to, let you select which organization to login, then returns connection information.
-
-You can use Get-Credential to create Credential information, or you can simply invoke Connect-CrmOnlineDiscovery which prompts you to enter username/password.
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Credential
-
- System.Management.Automation.ParameterAttribute
- System.Management.Automation.CredentialAttribute
- System.Management.Automation.ArgumentTypeConverterAttribute
-
-
- A PS-Credential. You can invoke Get-Credential.
-
-
-
- ServerUrl
-
- System.Management.Automation.ValidatePatternAttribute
- System.Management.Automation.ParameterAttribute
- System.Management.Automation.ArgumentTypeConverterAttribute
-
-
- A Url of OnPrem Dynamics CRM Server.
-
-
-
- OrganizationName
-
- System.Management.Automation.ParameterAttribute
- System.Management.Automation.ArgumentTypeConverterAttribute
-
-
- An Organization Unique Name
-
-
-
- HomeRealmUrl
-
- System.Management.Automation.ParameterAttribute
- System.Management.Automation.ArgumentTypeConverterAttribute
-
-
- To specify HomeRealm when you use Claim Authentication with Multiple STS.
-
-
-
- InteractiveMode
-
- System.Management.Automation.ParameterAttribute
- System.Management.Automation.ArgumentTypeConverterAttribute
-
-
- Switch to launch a wpf dialog to discover and connect to CRM Online instances.
-
-
-
-
-
- Example 1
- Connect-CrmOnPremDiscovery
-
-
-
-
- Example 2
- PS C:\>$cred = Get-Credential
-PS C:\>Connect-CrmOnPremDiscovery -Credential $cred -ServerUrl http://crm2015:5555
-
- This example passes credential and ServerUrl. Displays all CRM organization, and returns connection.
-
-
-
- Example 3
- PS C:\>$cred = Get-Credential
-PS C:\>Connect-CrmOnPremDiscovery -Credential $cred -ServerUrl http://crm2015:5555 -OrganizationName CRM
- This example passes credential, ServerUrl and Organization Unique Name. It does not prompt you at all and returns connection.
-
-
-
- Example 4
- PS C:\>Connect-CrmOnPremDiscovery -InteractiveMode
- This example shows how to use -InteractiveMode switch. By specifying the switch, you can login via GUI tool.
-
-
-
-
-
- false
-
-
- Disable-CrmLanguagePack
-
- Disable-CrmLanguagePack [-conn <CrmServiceClient>] [-LCID] <Int32>
-
-
- Executes DeprovisionLanguageRequest Organization Request.
- The Disable-CrmLanguagePack cmdlet lets you deprovision LanguagePack.
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- conn
-
- System.Management.Automation.ParameterAttribute
- System.Management.Automation.ArgumentTypeConverterAttribute
-
-
- A connection to your CRM organization. Use $conn = Get-CrmConnection <Parameters> to generate it.
-
-
-
-
- LCID
-
- System.Management.Automation.ParameterAttribute
- System.Management.Automation.ArgumentTypeConverterAttribute
-
-
- A Language ID.
-
-
-
-
-
-
- Example 1
- Disable-CrmLanguagePack -conn $conn -LCID 1041
-
- This example deprovisions Japanese Language Pack.
-
-
-
-
- Example 2
- Disable-CrmLanguagePack 1041
-
- This example deprovisions Japanese Language Pack by omitting parameters names.
-When omitting parameter names, you do not provide $conn, cmdlets automatically finds it.
-
-
-
-
-
- false
-
-
- Enable-CrmLanguagePack
-
- Enable-CrmLanguagePack [-conn <CrmServiceClient>] [-LCID] <Int32>
-
-
- Executes ProvisionLanguageRequest Organization Request.
-
- The Enable-CrmLanguagePack cmdlet lets you provision LanguagePack. For OnPremise, you need to install corresponding Language Pack inadvance.
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- conn
-
- System.Management.Automation.ParameterAttribute
- System.Management.Automation.ArgumentTypeConverterAttribute
-
-
- A connection to your CRM organization. Use $conn = Get-CrmConnection <Parameters> to generate it.
-
-
-
-
- LCID
-
- System.Management.Automation.ParameterAttribute
- System.Management.Automation.ArgumentTypeConverterAttribute
-
-
- A Language ID.
-
-
-
-
-
-
- Example 1
- Enable-CrmLanguagePack -conn $conn -LCID 1041
-
- This example provisions Japanese Language Pack.
-
-
-
-
- Example 2
- Enable-CrmLanguagePack 1041
-
- This example provisions Japanese Language Pack by omitting parameters names.
-When omitting parameter names, you do not provide $conn, cmdlets automatically finds it.
-
-
-
-
-
- false
-
-
- Export-CrmApplicationRibbonXml
-
- Export-CrmApplicationRibbonXml [-conn <CrmServiceClient>] [[-RibbonFilePath] <String>]
-
-
- Retrieves the ribbon definition XML for application and saves it to a file on the file system.
-
- The Export-CrmEntityRibbonXml cmdlet lets you retrieve ribbon definition XML for an Entity.
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- conn
-
- System.Management.Automation.ParameterAttribute
- System.Management.Automation.ArgumentTypeConverterAttribute
-
-
- A connection to your CRM organization. Use $conn = Get-CrmConnection <Parameters> to generate it.
-
-
-
-
- RibbonFilePath
-
- System.Management.Automation.AliasAttribute
- System.Management.Automation.ParameterAttribute
- System.Management.Automation.ArgumentTypeConverterAttribute
-
-
- Path
-
- The path to the desired output location. This should be a full file path, e.g.-c:\temp
-
-
-
-
-
-
- Example 1
- Export-CrmEntityRibbonXml -conn $conn -EntityLogicalName Account -Path d:\temp\accountribbon.xml
-
- This example gets the Ribbon XML for the account entity and outputs it to the specified file path.
-
-
-
-
-
-
- false
-
-
- Export-CrmEntityRibbonXml
-
- Export-CrmEntityRibbonXml [-conn <CrmServiceClient>] [-EntityLogicalName] <String> [[-RibbonFilePath] <String>]
-
-
- Retrieves the ribbon definition XML for an Entity and saves it to a file on the file system.
-
- The Export-CrmEntityRibbonXml cmdlet lets you retrieve ribbon definition XML for an Entity.
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- conn
-
- System.Management.Automation.ParameterAttribute
- System.Management.Automation.ArgumentTypeConverterAttribute
-
-
- A connection to your CRM organization. Use $conn = Get-CrmConnection <Parameters> to generate it.
-
-
-
-
- EntityLogicalName
-
- System.Management.Automation.ParameterAttribute
- System.Management.Automation.ArgumentTypeConverterAttribute
-
-
- A logicalname for Entity. e.g.- account, contact, lead, etc..
-
-
-
-
- RibbonFilePath
-
- System.Management.Automation.AliasAttribute
- System.Management.Automation.ParameterAttribute
- System.Management.Automation.ArgumentTypeConverterAttribute
-
-
- Path
-
- The path to the desired output location. This should be a full file path, e.g.-c:\temp
-
-
-
-
-
-
- Example 1
- Export-CrmEntityRibbonXml -conn $conn -EntityLogicalName account -RibbonFilePath c:\temp
-
- This example export the Ribbon XML for the account entity to c:\temp\accountRibbon.xml.
-
-
-
-
-
-
- false
-
-
- Export-CrmSolution
-
- Export-CrmSolution [-conn <CrmServiceClient>] [-SolutionName] <String> [[-SolutionFilePath] <String>] [-SolutionZipFileName <String>] [-Managed] [-TargetVersion <String>] [-ExportAutoNumberingSettings] [-ExportCalendarSettings] [-ExportCustomizationSettings] [-ExportEmailTrackingSettings] [-ExportGeneralSettings] [-ExportMarketingSettings] [-ExportOutlookSynchronizationSettings] [-ExportRelationshipRoles] [-ExportIsvConfig] [-ExportSales]
-
-
- Exports a solution by Name from a CRM Organization.
-
- The Export-CrmSolution cmdlet lets you export a solution file from CRM.
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- conn
-
- System.Management.Automation.ParameterAttribute
- System.Management.Automation.ArgumentTypeConverterAttribute
-
-
- A connection to your CRM organization. Use $conn = Get-CrmConnection <Parameters> to generate it.
-
-
-
-
- SolutionName
-
- System.Management.Automation.ParameterAttribute
- System.Management.Automation.ArgumentTypeConverterAttribute
-
-
- An unique name of the exporting solution.
-
-
-
-
- SolutionFilePath
-
- System.Management.Automation.ParameterAttribute
- System.Management.Automation.ArgumentTypeConverterAttribute
-
-
- A path to save exporting solution.
-
-
-
-
- SolutionZipFileName
-
- System.Management.Automation.ParameterAttribute
- System.Management.Automation.ArgumentTypeConverterAttribute
-
-
- A file name of exporting solution zip file.
-
-
-
-
- Managed
-
- System.Management.Automation.ParameterAttribute
- System.Management.Automation.ArgumentTypeConverterAttribute
-
-
- Specify the parameter to export the solution as managed. if you don't give this parameter, the solution will be exported as unmanaged.
-
-
-
-
- TargetVersion
-
- System.Management.Automation.ParameterAttribute
- System.Management.Automation.ArgumentTypeConverterAttribute
-
-
- Specify TargetVersion of exporting solution.
-Examples of Valid versions: 7.0.0.0, 7.1.0.0, 8.0.0.0, 8.1.0.0, 8.2.0.0
-See https://msdn.microsoft.com/en-us/library/dn689055.aspx for more details.
-
-
-
- ExportAutoNumberingSettings
-
- System.Management.Automation.ParameterAttribute
- System.Management.Automation.ArgumentTypeConverterAttribute
-
-
- Specify the parameter to export auto numbering settings.
-
-
-
-
- ExportCalendarSettings
-
- System.Management.Automation.ParameterAttribute
- System.Management.Automation.ArgumentTypeConverterAttribute
-
-
- Specify the parameter to export calendar settings.
-
-
-
-
- ExportCustomizationSettings
-
- System.Management.Automation.ParameterAttribute
- System.Management.Automation.ArgumentTypeConverterAttribute
-
-
- Specify the parameter to export customization settings.
-
-
-
-
- ExportEmailTrackingSettings
-
- System.Management.Automation.ParameterAttribute
- System.Management.Automation.ArgumentTypeConverterAttribute
-
-
- Specify the parameter to export email tracking settings.
-
-
-
-
- ExportGeneralSettings
-
- System.Management.Automation.ParameterAttribute
- System.Management.Automation.ArgumentTypeConverterAttribute
-
-
- Specify the parameter to export general settings.
-
-
-
-
- ExportMarketingSettings
-
- System.Management.Automation.ParameterAttribute
- System.Management.Automation.ArgumentTypeConverterAttribute
-
-
- Specify the parameter to export marketing settings.
-
-
-
-
- ExportOutlookSynchronizationSettings
-
- System.Management.Automation.ParameterAttribute
- System.Management.Automation.ArgumentTypeConverterAttribute
-
-
- Specify the parameter to export outlook synchronization settings.
-
-
-
-
- ExportRelationshipRoles
-
- System.Management.Automation.ParameterAttribute
- System.Management.Automation.ArgumentTypeConverterAttribute
-
-
- Specify the parameter to export relationship roles.
-
-
-
-
- ExportIsvConfig
-
- System.Management.Automation.ParameterAttribute
- System.Management.Automation.ArgumentTypeConverterAttribute
-
-
- Specify the parameter to export ISV config.
-
-
-
-
- ExportSales
-
- System.Management.Automation.ParameterAttribute
- System.Management.Automation.ArgumentTypeConverterAttribute
-
-
- Specify the parameter to export sales settings. Only available CRM 2015+
-
-
-
-
-
-
- Example 1
- Export-CrmSolution -conn $conn -SolutionName "MySolution"
-
- This example exports "MySolution" solution as unmanaged with current path and default name.
-
-
-
-
- Example 2
- Export-CrmSolution "MySolution"
-
- This example exports "MySolution" solution as unmanaged with current path and default name by omitting $conn parameter.
-When omitting $conn parameter, cmdlets automatically finds it.
-
-
-
- Example 3
- Export-CrmSolution -conn $conn -SolutionName "MySolution" -Managed -SolutionFilePath "C:\temp" -SolutionZipFileName "MySolution_Managed.zip"
-
- This example exports "MySolution" solution as managed with specified path and name.
-
-
-
-
-
-
- false
-
-
- Export-CrmSolutionTranslation
-
- Export-CrmSolutionTranslation [-conn <CrmServiceClient>] [-SolutionName] <String> [-TranslationFilePath <String>] [-TranslationZipFileName <String>]
-
-
- Exports a translation from a solution.
-
- The Export-CrmSolutionTranslation cmdlet lets you export a translation from a solution.
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- conn
-
- System.Management.Automation.ParameterAttribute
- System.Management.Automation.ArgumentTypeConverterAttribute
-
-
- A connection to your CRM organization. Use $conn = Get-CrmConnection <Parameters> to generate it.
-
-
-
-
- SolutionName
-
- System.Management.Automation.ParameterAttribute
- System.Management.Automation.ArgumentTypeConverterAttribute
-
-
- An unique name of the exporting solution.
-
-
-
-
- TranslationFilePath
-
- System.Management.Automation.ParameterAttribute
- System.Management.Automation.ArgumentTypeConverterAttribute
-
-
- A path to save exporting solution translation.
-
-
-
-
- TranslationZipFileName
-
- System.Management.Automation.ParameterAttribute
- System.Management.Automation.ArgumentTypeConverterAttribute
-
-
- A file name of exporting solution translation zip file.
-
-
-
-
-
-
- Example 1
- Export-CrmSolutionTranslation -conn $conn -SolutionName "MySolution"
-
- This example exports translation file of "MySolution" solution with current path and default name.
-
-
-
-
- Example 2
- Export-CrmSolutionTranslation -SolutionName "MySolution"
-
- This example exports translation file of "MySolution" solution with current path and default name by omitting $conn parameter.
-When omitting $conn parameter, cmdlets automatically finds it.
-
-
-
- Example 3
- Export-CrmSolutionTranslation -conn $conn -SolutionName "MySolution" -TranslationFilePath "C:\temp" -TranslationZipFileName "CrmTranslations_MySolution.zip"
-
- This example exports translation file of "MySolution" solution with specified path and name.
-
-
-
-
-
-
- false
-
-
- Get-CrmAllLanguagePacks
-
- Get-CrmAllLanguagePacks [[-conn] <CrmServiceClient>]
-
-
- Executes RetrieveAvailableLanguagesRequest Organization Request.
-
- The Get-CrmAllLanguagePacks cmdlet lets you retrieve all available LanguagePack.
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- conn
-
- System.Management.Automation.ParameterAttribute
- System.Management.Automation.ArgumentTypeConverterAttribute
-
-
- A connection to your CRM organization. Use $conn = Get-CrmConnection <Parameters> to generate it.
-
-
-
-
-
-
- Example 1
- PS C:\>Get-CrmAllLanguagePacks -conn $conn
-
- This example retrieves all available Language Pack.
-
-
-
-
- Example 2
- PS C:\>Get-CrmAllLanguagePacks
-
- This example etrieves all available Language Pack by omitting parameters names.
-When omitting parameter names, you do not provide $conn, cmdlets automatically finds it.
-
-
-
-
-
- false
-
-
- Get-CrmEntityAllMetadata
-
- Get-CrmEntityAllMetadata [-conn <CrmServiceClient>] [[-OnlyPublished] <Boolean>] [[-EntityFilters] <String>]
-
-
- Retrieves all Metadata for CRM organization.
- The Get-CrmEntityAllMetadata cmdlet lets you retrieve all Metadata for CRM organization. You can specify which type of Metadata you want to retrive by using EntityFilters parameter.
-
-
-
-
-
-
-
-
-
-
-
-
-
- conn
-
- System.Management.Automation.ParameterAttribute
- System.Management.Automation.ArgumentTypeConverterAttribute
-
-
- A connection to your CRM organization. Use $conn = Get-CrmConnection <Parameters> to generate it.
-
-
-
- OnlyPublished
-
- System.Management.Automation.ParameterAttribute
- System.Management.Automation.ArgumentTypeConverterAttribute
-
-
- Specify $True if you retrieve only published Metadata. Specifying $False will display unpublished metadata (metadata that will eventually become published)
-
-
-
- EntityFilters
-
- System.Management.Automation.ParameterAttribute
- System.Management.Automation.ArgumentTypeConverterAttribute
-
-
- Specify which type of Metadata you want to retrieve. Valid options are "all", "attributes", "entity", "privileges", "relationships".
-
-
-
-
-
- Example 1
- Get-CrmEntityAllMetadata -conn $conn -OnlyPublished $True -EntityFilters all
- This example retrieves all published Metadata.
-
-
-
- Example 2
- Get-CrmEntityAllMetadata $True Entity
- This example retrieves all published Entity metadata by omitting parameter names.
-When omitting parameter names, you do not provide $conn, cmdlets automatically finds it.
-
-
-
- Example 3
- Get-CrmEntityAllMetadata -conn $conn -EntityFilters Entity | select -property @{N='LogicalName';E={$_.logicalname}}, @{N='DisplayName';E={$_.DisplayCollectionName.UserLocalizedLabel.Label}} | sort DisplayName
- This samples get Entity metadata and list its logicalname and display name as table.
-
-
-
-
-
- false
-
-
- Get-CrmEntityAttributeMetadata
-
- Get-CrmEntityAttributeMetadata [-conn <CrmServiceClient>] [-EntityLogicalName] <String> [-FieldLogicalName] <String>
-
-
- Retrieves an attribute metadata for an Entity.
- The Get-CrmEntityAttributeMetadata cmdlet lets you retrieve an attribute metadata for an Entity.
-
-
-
-
-
-
-
-
-
-
-
-
-
- conn
-
- System.Management.Automation.ParameterAttribute
- System.Management.Automation.ArgumentTypeConverterAttribute
-
-
- A connection to your CRM organization. Use $conn = Get-CrmConnection <Parameters> to generate it.
-
-
-
- EntityLogicalName
-
- System.Management.Automation.ParameterAttribute
- System.Management.Automation.ArgumentTypeConverterAttribute
-
-
- A logicalname for Entity. i.e.)account, contact, lead, etc..
-
-
-
- FieldLogicalName
-
- System.Management.Automation.ParameterAttribute
- System.Management.Automation.ArgumentTypeConverterAttribute
-
-
- A logicalname for a field.
-
-
-
-
-
- Example 1
- Get-CrmEntityAttributeMetadata -conn $conn -EntityLogicalName account -FieldLogicalName parentaccountid
- This example retrieves Parent Account attribute metadata for Account Entity.
-
-
-
- Example 2
- Get-CrmEntityAttributeMetadata account parentaccountid
-
- This example retrieves Parent Account attribute metadata for Account Entity by omitting parameter names.
-When omitting parameter names, you do not provide $conn, cmdlets automatically finds it.
-
-
-
-
-
- false
-
-
- Get-CrmEntityAttributes
-
- Get-CrmEntityAttributes [-conn <CrmServiceClient>] [-EntityLogicalName] <String>
-
-
- Retrieves all attributes metadata for an Entity.
- The Get-CrmEntityAttributes cmdlet lets you retrieve all attributes metadata for an Entity.
-
-
-
-
-
-
-
-
-
-
-
-
-
- conn
-
- System.Management.Automation.ParameterAttribute
- System.Management.Automation.ArgumentTypeConverterAttribute
-
-
- A connection to your CRM organization. Use $conn = Get-CrmConnection <Parameters> to generate it.
-
-
-
- EntityLogicalName
-
- System.Management.Automation.ParameterAttribute
- System.Management.Automation.ArgumentTypeConverterAttribute
-
-
- A logicalname for Entity. i.e.)account, contact, lead, etc..
-
-
-
-
-
- Example 1
- Get-CrmEntityAttributes -conn $conn -EntityLogicalName account
- This example retrieves all attributes metadata for Account Entity.
-
-
-
- Example 2
- Get-CrmEntityAttributes account
- This example retrieves all attributes metadata for Account Entity by omitting parameter names.
-When omitting parameter names, you do not provide $conn, cmdlets automatically finds it.
-
-
-
- Example 3
- Get-CrmEntityAttributes account | Where {$_.IsCustomAttribute -eq $true} | Select logicalname
- This example retrieves all attributes metadata for an account, and filter for only custom fields. Then displays logicalname field only.
-
-
-
-
-
- false
-
-
- Get-CrmEntityDisplayName
-
- Get-CrmEntityDisplayName [-conn <CrmServiceClient>] [-EntityLogicalName] <String>
-
-
- Retrieves Display Name for an Entity.
- The Get-CrmEntityDisplayName cmdlet lets you retrieve Display Name for an Entity.
-
-
-
-
-
-
-
-
-
-
-
-
-
- conn
-
- System.Management.Automation.ParameterAttribute
- System.Management.Automation.ArgumentTypeConverterAttribute
-
-
- A connection to your CRM organization. Use $conn = Get-CrmConnection <Parameters> to generate it.
-
-
-
- EntityLogicalName
-
- System.Management.Automation.ParameterAttribute
- System.Management.Automation.ArgumentTypeConverterAttribute
-
-
- A logicalname for Entity. i.e.)account, contact, lead, etc..
-
-
-
-
-
- Example 1
- Get-CrmEntityDisplayName -conn $conn -EntityLogicalName account
- This example retrieves Display Name for Account Entity.
-
-
-
- Example 2
- Get-CrmEntityDisplayName incident
- This example retrieves Display Name for Incident Entity by omitting parameter names.
-When omitting parameter names, you do not provide $conn, cmdlets automatically finds it.
-
-
-
-
-
- false
-
-
- Get-CrmEntityDisplayPluralName
-
- Get-CrmEntityDisplayPluralName [-conn <CrmServiceClient>] [-EntityLogicalName] <String>
-
-
- Retrieves Display Plural Name for an Entity.
- The Get-CrmEntityDisplayPluralName cmdlet lets you retrieve Display Plural Name for an Entity.
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- conn
-
- System.Management.Automation.ParameterAttribute
- System.Management.Automation.ArgumentTypeConverterAttribute
-
-
- A connection to your CRM organization. Use $conn = Get-CrmConnection <Parameters> to generate it.
-
-
-
-
- EntityLogicalName
-
- System.Management.Automation.ParameterAttribute
- System.Management.Automation.ArgumentTypeConverterAttribute
-
-
- A logicalname for Entity. i.e.)account, contact, lead, etc..
-
-
-
-
-
-
- Example 1
- Get-CrmEntityDisplayPluralName -conn $conn -EntityLogicalName account
-
- This example retrieves Display Name for Account Entity.
-
-
-
-
- Example 2
- Get-CrmEntityDisplayPluralName incident
-
- This example retrieves Display Name for Incident Entity by omitting parameter names.
-When omitting parameter names, you do not provide $conn, cmdlets automatically finds it.
-
-
-
-
-
-
- false
-
-
- Get-CrmEntityMetadata
-
- Get-CrmEntityMetadata [-conn <CrmServiceClient>] [-EntityLogicalName] <String> [[-EntityFilters] <String>]
-
-
- Retrieves Metadata for an Entity.
- The Get-CrmEntityMetadata cmdlet lets you retrieve Metadata for an Entity. You can specify which type of Metadata you want to retrieve by using EntityFilters parameter.
-
-
-
-
-
-
-
-
-
-
-
-
-
- conn
-
- System.Management.Automation.ParameterAttribute
- System.Management.Automation.ArgumentTypeConverterAttribute
-
-
- A connection to your CRM organization. Use $conn = Get-CrmConnection <Parameters> to generate it.
-
-
-
- EntityLogicalName
-
- System.Management.Automation.ParameterAttribute
- System.Management.Automation.ArgumentTypeConverterAttribute
-
-
- A logicalname for Entity. i.e.)account, contact, lead, etc..
-
-
-
- EntityFilters
-
- System.Management.Automation.ParameterAttribute
- System.Management.Automation.ArgumentTypeConverterAttribute
-
-
- Specify which type of Metadata you want to retrieve. Valid options are "all", "attributes", "entity", "privileges", "relationships".
-
-
-
-
-
- Example 1
- Get-CrmEntityMetadata -conn $conn -EntityLogicalName account EntityFilters all
- This example retrieves all Metadata for Account Entity.
-
-
-
- Example 2
- Get-CrmEntityMetadata account relationships
- ActivityTypeMask : 0
-Attributes : {Microsoft.Xrm.Sdk.Metadata.AttributeTypeDisplayName, Microsoft.Xrm.Sdk.Metadata.StringFormatName,
- Microsoft.Xrm.Sdk.Metadata.StringFormatName, Microsoft.Xrm.Sdk.Metadata.StringFormatName...}
-AutoRouteToOwnerQueue : False
-CanTriggerWorkflow : True
-Description : Microsoft.Xrm.Sdk.Label
-DisplayCollectionName : Microsoft.Xrm.Sdk.Label
-...
-
-
-
-
-
- false
-
-
- Get-CrmEntityName
-
- Get-CrmEntityName [-conn <CrmServiceClient>] [-EntityTypeCode] <Int32>
-
-
- Retrieves Entity logicalname for EntityTypeCode.
-
- The Get-CrmEntityName cmdlet lets you retrieve Entity logicalname. You can specify EntityTypeCode.
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- conn
-
- System.Management.Automation.ParameterAttribute
- System.Management.Automation.ArgumentTypeConverterAttribute
-
-
- A connection to your CRM organization. Use $conn = Get-CrmConnection <Parameters> to generate it.
-
-
-
-
- EntityTypeCode
-
- System.Management.Automation.ParameterAttribute
- System.Management.Automation.ArgumentTypeConverterAttribute
-
-
- A number for Entity.
-
-
-
-
-
-
- Example 1
- Get-CrmEntityName -conn $conn -EntityTypeCode 1
-
- This example retrieves Entity logicalname for EntityTypeCode 1 (Account).
-
-
-
-
- Example 2
- Get-CrmEntityName 4200
-
- This example retrieves Entity logicalname for EntityTypeCode 4200 (Activity) by omitting parameter names.
-When omitting parameter names, you do not provide $conn, cmdlets automatically finds it.
-
-
-
-
-
- false
-
-
- Get-CrmEntityOptionSet
-
- Get-CrmEntityOptionSet [-conn <CrmServiceClient>] [-EntityLogicalName] <String> [-FieldLogicalName] <String>
-
-
- Retrieves a picklist field of an Entity.
-
- The Get-CrmEntityOptionSet cmdlet lets you retrieve a picklist field of an Entity.
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- conn
-
- System.Management.Automation.ParameterAttribute
- System.Management.Automation.ArgumentTypeConverterAttribute
-
-
- A connection to your CRM organization. Use $conn = Get-CrmConnection <Parameters> to generate it.
-
-
-
-
- EntityLogicalName
-
- System.Management.Automation.ParameterAttribute
- System.Management.Automation.ArgumentTypeConverterAttribute
-
-
- A logicalname for Entity. i.e.)account, contact, lead, etc..
-
-
-
-
- FieldLogicalName
-
- System.Management.Automation.ParameterAttribute
- System.Management.Automation.ArgumentTypeConverterAttribute
-
-
- A logicalname for a picklist filed.
-
-
-
-
-
-
- Example 1
- Get-CrmEntityOptionSet -conn $conn -EntityLogicalName account -FieldLogicalName statuscode
-
- This example retrieves statuscode picklist for Account Entity.
-
-
-
-
- Example 2
- Get-CrmEntityOptionSet account statuscode
-
- This example retrieves statuscode picklist for Account Entity by omitting parameter names.
-When omitting parameter names, you do not provide $conn, cmdlets automatically finds it.
-
-
-
- Example 3
- Get-CrmEntityOptionSet account statuscode | % {$_.Items}
-
- This example retrieves statuscode picklist for Account Entity and displays Label and Id.
-
-
-
-
-
-
- false
-
-
- Get-CrmEntityRecordCount
-
- Get-CrmEntityRecordCount [-conn <CrmServiceClient>] [-EntityLogicalName] <String>
-
-
- Retrieves total record count for an Entity.
-
- The Get-CrmEntityRecordCount cmdlet lets you retrieve total record count for an Entity.
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- conn
-
- System.Management.Automation.ParameterAttribute
- System.Management.Automation.ArgumentTypeConverterAttribute
-
-
- A connection to your CRM organization. Use $conn = Get-CrmConnection <Parameters> to generate it.
-
-
-
-
- EntityLogicalName
-
- System.Management.Automation.ParameterAttribute
- System.Management.Automation.ArgumentTypeConverterAttribute
-
-
- A logicalname for an Entity to retrieve. i.e.)account, contact, lead, etc..
-
-
-
-
-
-
- Example 1
- Get-CrmEntityRecordCount -conn $conn -EntityLogicalName account
-
- 10
-
-
-
-
- Example 2
- Get-CrmEntityRecordCount contact
-
- This example retrieves total record count for Contact Entity by omitting parameter names.
-When omitting parameter names, you do not provide $conn, cmdlets automatically finds it.
-
-
-
-
-
- false
-
-
- Get-CrmEntityTypeCode
-
- Get-CrmEntityTypeCode [-conn <CrmServiceClient>] [-EntityLogicalName] <String>
-
-
- Retrieves EntityTypeCode for an Entity.
-
- The Get-CrmEntityTypeCode cmdlet lets you retrieve EntityTypeCode. You can specify EntityLogicalName.
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- conn
-
- System.Management.Automation.ParameterAttribute
- System.Management.Automation.ArgumentTypeConverterAttribute
-
-
- A connection to your CRM organization. Use $conn = Get-CrmConnection <Parameters> to generate it.
-
-
-
-
- EntityLogicalName
-
- System.Management.Automation.ParameterAttribute
- System.Management.Automation.ArgumentTypeConverterAttribute
-
-
- A logicalname for Entity. i.e.)account, contact, lead, etc..
-
-
-
-
-
-
- Example 1
- Get-CrmEntityTypeCode -conn $conn -EntityLogicalName account
- This example retrieves EntityTypeCode for Account Entity.
-
-
-
- Example 2
- Get-CrmEntityTypeCode lead
-
- This example retrieves EntityTypeCode for Lead Entity by omitting parameter names.
-When omitting parameter names, you do not provide $conn, cmdlets automatically finds it.
-
-
-
-
-
- false
-
-
- Get-CrmFailedWorkflows
-
- Get-CrmFailedWorkflows [-conn <CrmServiceClient>] [[-TopCount] <Int32>] [[-PageNumber] <Int32>] [[-PageCookie] <String>] [[-AllRows] <SwitchParameter>]
-
-
- Retrieves alert notifications from CRM organization.
-
- The Get-CrmFailedWorkflows cmdlet lets you retrieve failed workflows from a CRM organization.
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- conn
-
- System.Management.Automation.ParameterAttribute
- System.Management.Automation.ArgumentTypeConverterAttribute
-
-
- A connection to your CRM organization. Use $conn = Get-CrmConnection <Parameters> to generate it.
-
-
-
-
- TopCount
-
- System.Management.Automation.ParameterAttribute
- System.Management.Automation.ArgumentTypeConverterAttribute
-
-
- Maximum number of records to retrieve
-
-
-
- PageNumber
-
- System.Management.Automation.ParameterAttribute
- System.Management.Automation.ArgumentTypeConverterAttribute
-
-
-
-
-
-
- PageCookie
-
- System.Management.Automation.ParameterAttribute
- System.Management.Automation.ArgumentTypeConverterAttribute
-
-
-
-
-
-
- AllRows
-
- System.Management.Automation.ParameterAttribute
- System.Management.Automation.ArgumentTypeConverterAttribute
-
-
- Indicates you would like to bring back data from all pages (all available rows in CRM, this function will take longer to execute, but will include all the data rather than the first 5000 rows)
-
-
-
-
-
- Example 1
- Get-CrmFailedWorkflows
-
- This example retrieves failed workflow records notifications by omitting parameter names.
-When omitting parameter names, you do not provide $conn, cmdlets automatically finds it.
-
-
-
- Example 2
- Get-CrmFailedWorkflows | % {$_.CrmRecords} | select message,startedon
-
- This example retrieves workflow errors and displays them with the startedon and message attributes.
-
-
-
-
-
-
- false
-
-
- Get-CrmGlobalOptionSet
-
- Get-CrmGlobalOptionSet [-conn <CrmServiceClient>] [-OptionSetName] <String>
-
-
- Retrieves a global OptionSet.
-
- The Get-CrmGlobalOptionSet cmdlet lets you retrieve a global OptionSet.
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- conn
-
- System.Management.Automation.ParameterAttribute
- System.Management.Automation.ArgumentTypeConverterAttribute
-
-
- A connection to your CRM organization. Use $conn = Get-CrmConnection <Parameters> to generate it.
-
-
-
-
- OptionSetName
-
- System.Management.Automation.ParameterAttribute
- System.Management.Automation.ArgumentTypeConverterAttribute
-
-
- A logicalname for a global OptionSet.
-
-
-
-
-
-
- Example 1
- Get-CrmGlobalOptionSet -conn $conn -OptionSetName incident_caseorigincode
-
- This example retrieves incident_caseorigincode global OptionSet.
-
-
-
-
- Example 2
- Get-CrmGlobalOptionSet incident_caseorigincode
-
- This example retrieves incident_caseorigincode global OptionSet by omitting parameter names.
-When omitting parameter names, you do not provide $conn, cmdlets automatically finds it.
-
-
-
- Example 3
- PS C:\>$optionset = Get-CrmGlobalOptionSet incident_caseorigincode
-PS C:\>$optionset.Options | % {[string]$_.Value + ":" + $_.Label.LocalizedLabels.Label}
- This example retrieves incident_caseorigincode global OptionSet and stores to variable, then query its value and display name.
-
-
-
-
-
- false
-
-
- Get-CrmRecord
-
- Get-CrmRecord [-conn <CrmServiceClient>] [-EntityLogicalName] <String> [-Id] <Guid> [-Fields] <String[]> [[-IncludeNullValue] <SwitchParameter>]
-
-
- Retrieves a CRM record by specifying EntityLogicalName, record's Id (guid) and field names.
-
- The Get-CrmRecord cmdlet lets you retrieve a record from your CRM organization. The retrieve results has two properties for each field like name and name_Property.
-The field with "_Property" contains field's logicalname and its Type information, and another field contains "readable" value, which is either FormattedValue or extracted value from CRM special type like EntityReference.
-
-The output also contains logical name of the Entity and original field which contains raw data. You can ignore these two fields.
-
-You can specify fields as fieldname1,fieldname2,fieldname3 syntax or * to retrieve all fields (not recommended for performance reason.)
-You can use Get-CrmEntityAttributes cmdlet to see all fields logicalname. The retrieved data can be passed to several cmdlets like Set-CrmRecord, Removed-CrmRecord to further process it.
-
-
-
-
-
-
-
-
-
-
-
-
-
- conn
-
- System.Management.Automation.ParameterAttribute
- System.Management.Automation.ArgumentTypeConverterAttribute
-
-
- A connection to your CRM organizatoin. Use $conn = Get-CrmConnection <Parameters> to generate it.
-
-
-
- EntityLogicalName
-
- System.Management.Automation.ParameterAttribute
- System.Management.Automation.ArgumentTypeConverterAttribute
-
-
- A logicalname for an Entity to retrieve. i.e.)accout, contact, lead, etc..
-
-
-
- Id
-
- System.Management.Automation.ParameterAttribute
- System.Management.Automation.ArgumentTypeConverterAttribute
-
-
- An Id (guid) of the record
-
-
-
- Fields
-
- System.Management.Automation.ParameterAttribute
- System.Management.Automation.ArgumentTypeConverterAttribute
-
-
- A List of field logicalnames. Use "fieldname1, fieldname2, fieldname3" syntax to specify Fields, or use "*" to retrieve all fields (not recommended for performance reason.)
-
-
-
- IncludeNullValue
-
- System.Management.Automation.ParameterAttribute
- System.Management.Automation.ArgumentTypeConverterAttribute
-
-
- Sepcify when you want to include fields even if it has null value. By default, all the fields doesn't include value won't be returned.
-
-
-
-
-
- Example 1
- Get-CrmRecord -conn $conn -EntityLogicalName account -Id be02caab-6c16-e511-80d6-c4346bc43dc0 -Fields name,accountnumber
-
- This example retrieves an account record with name and accountnumber fields. If the value of the field is null, then it won't be returned.
-
-
-
- Example 2
- Get-CrmRecord account be02caab-6c16-e511-80d6-c4346bc43dc0 primarycontactid,statuscode
- This example retrieves an account record with PrimaryContact and StateCode fields by omitting parameter names.
-When omitting parameter names, you do not provide $conn, cmdlets automatically finds it.
-
-
-
- Example 3
- Get-CrmRecord account 5b2fe1f3-b503-e511-80d4-c4346bc43dc0 *
- This example retrieve an account record with all fields (which have values).
-
-
-
- Example 4
- Get-CrmRecord -conn $conn -EntityLogicalName account -Id be02caab-6c16-e511-80d6-c4346bc43dc0 -Fields name,accountnumber,websiteurl -IncludeNullValue
-
- This example retrieves an account record with specified fields even if some of them are null value.
-
-
-
-
-
- false
-
-
- Get-CrmRecords
-
- Get-CrmRecords [-conn <CrmServiceClient>] [-EntityLogicalName] <String> [[-FilterAttribute] <String>] [[-FilterOperator] <String> {eq | neq | ne | gt | ge | le | lt | like | not-like | in | not-in | between | not-between | null | not-null | yesterday | today | tomorrow | last-seven-days | next-seven-days | last-week | this-week | next-week | last-month | this-month | next-month | on | on-or-before | on-or-after | last-year | this-year | next-year | last-x-hours | next-x-hours | last-x-days | next-x-days | last-x-weeks | next-x-weeks | last-x-months | next-x-months | olderthan-x-months | olderthan-x-years | olderthan-x-weeks | olderthan-x-days | olderthan-x-hours | olderthan-x-minutes | last-x-years | next-x-years | eq-userid | ne-userid | eq-userteams | eq-useroruserteams | eq-useroruserhierarchy | eq-useroruserhierarchyandteams | eq-businessid | ne-businessid | eq-userlanguage | this-fiscal-year | this-fiscal-period | next-fiscal-year | next-fiscal-period | last-fiscal-year | last-fiscal-period | last-x-fiscal-years | last-x-fiscal-periods | next-x-fiscal-years | next-x-fiscal-periods | in-fiscal-year | in-fiscal-period | in-fiscal-period-and-year | in-or-before-fiscal-period-and-year | in-or-after-fiscal-period-and-year | begins-with | not-begin-with | ends-with | not-end-with | under | eq-or-under | not-under | above | eq-or-above} ] [[-FilterValue] <String>] [[-Fields] <String[]>] [[-AllRows] <SwitchParameter>] [[-TopCount] <Int32>]
-
-
- Retrieves CRM records by using single filter condition.
-
- The Get-CrmRecords cmdlet lets you retrieve CRM records by using single filter condition. It my return more than a record.
-You can specify condition operator by using PowerShell operator like "eq", "ne", "lt", "like", etc.
-
-You can specify desired fields as fieldname1,fieldname2,fieldname3 syntax or * to retrieve all fields (not recommended for performance reason.)
-You can use Get-CrmEntityAttributes cmdlet to see all fields logicalname. The retrieved data can be passed to several cmdlets like Set-CrmRecord, Removed-CrmRecord to further process it.
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- conn
-
- System.Management.Automation.ParameterAttribute
- System.Management.Automation.ArgumentTypeConverterAttribute
-
-
- A connection to your CRM organization. Use $conn = Get-CrmConnection <Parameters> to generate it.
-
-
-
-
- EntityLogicalName
-
- System.Management.Automation.AliasAttribute
- System.Management.Automation.ParameterAttribute
- System.Management.Automation.ArgumentTypeConverterAttribute
-
-
- EntityName
-
- A logicalname for an Entity to retrieve. i.e.)account, contact, lead, etc..
-
-
-
-
- FilterAttribute
-
- System.Management.Automation.AliasAttribute
- System.Management.Automation.ParameterAttribute
- System.Management.Automation.ArgumentTypeConverterAttribute
-
-
- FieldName
-
- A field logical name for filtering.
-
-
-
-
- FilterOperator
-
- System.Management.Automation.ValidateSetAttribute
- System.Management.Automation.AliasAttribute
- System.Management.Automation.ParameterAttribute
- System.Management.Automation.ArgumentTypeConverterAttribute
-
-
- Op
-
- An condition operator like "eq", "ne", "lt", "like", etc.
-
-
-
-
- FilterValue
-
- System.Management.Automation.AliasAttribute
- System.Management.Automation.ParameterAttribute
- System.Management.Automation.ArgumentTypeConverterAttribute
-
-
- Value
- FieldValue
-
- A field value for filtering
-
-
-
-
- Fields
-
- System.Management.Automation.ParameterAttribute
- System.Management.Automation.ArgumentTypeConverterAttribute
-
-
- A List of field logicalnames. Use "fieldname1, fieldname2, fieldname3" syntax to speficy Fields, or ues "*" to retrieve all fields (not recommended for performance reason.)
-
-
-
-
- AllRows
-
- System.Management.Automation.ParameterAttribute
- System.Management.Automation.ArgumentTypeConverterAttribute
-
-
- By default the first 5000 rows are returned, this switch will bring back all results regardless of how many
-
-
-
-
- TopCount
-
- System.Management.Automation.ParameterAttribute
- System.Management.Automation.ArgumentTypeConverterAttribute
-
-
-
-
-
-
-
-
- Example 1
- Get-CrmRecords -conn $conn -EntityLogicalName account -FilterAttribute name -FilterOperator "eq" -FilterValue "Adventure Works (sample)" -Fields name,accountnumber
-
- This example retrieves account(s) which name is "Adventure Works (sample)", with specified fields.
-
-
-
-
- Example 2
- Get-CrmRecords account name "like" "%(sample)%" name,accountnumber -AllRows
-
- This example retrieves account(s) which name includes "sample", with specified fields by omitting parameter names.
-When omitting parameter names, you do not provide $conn, cmdlets automatically finds it.
-
-
-
-
-
- false
-
-
- Get-CrmRecordsByFetch
-
- Get-CrmRecordsByFetch [-conn <CrmServiceClient>] [-Fetch] <String> [[-TopCount] <Int32>] [[-PageNumber] <Int32>] [[-PageCookie] <String>] [[-AllRows] <SwitchParameter>]
-
-
- Retrieves CRM records by using FetchXML query.
- The Get-CrmRecordsByFetch cmdlet lets you retrieve up to 5,000 records from your CRM organization by using FetchXML query.
-The output contains CrmRecords (List or retrieved records), PagingCookie (for next iteration), and NextPage (to indicate if there are more records on the next page).
-
-if you need to paging the result, you can also specify TopCount, PageNumber and PagingCookie.
-
-You can obtain FetchXML by using Advanced Find tool. As FetchXML query can be multiple lines, use "@ ... @" syntax to speficy the query.
-
-
-
-
-
-
-
-
-
-
-
-
-
- conn
-
- System.Management.Automation.ParameterAttribute
- System.Management.Automation.ArgumentTypeConverterAttribute
-
-
- A connection to your CRM organization. Use $conn = Get-CrmConnection <Parameters> to generate it.
-
-
-
- Fetch
-
- System.Management.Automation.ParameterAttribute
- System.Management.Automation.ArgumentTypeConverterAttribute
-
-
- A FetchXML query to retrieve records. You can obtain FetchXML by using Advanced Find tool. Use "@ ... @" syntax to specify the query.
-
-
-
- TopCount
-
- System.Management.Automation.ParameterAttribute
- System.Management.Automation.ArgumentTypeConverterAttribute
-
-
- Specify how many records you need to retireve at once (up to 5,000 at once).
-
-
-
-
- PageNumber
-
- System.Management.Automation.ParameterAttribute
- System.Management.Automation.ArgumentTypeConverterAttribute
-
-
- Specify starting page number for paging. Starting from 1.
-
-
-
-
- PageCookie
-
- System.Management.Automation.ParameterAttribute
- System.Management.Automation.ArgumentTypeConverterAttribute
-
-
- Specify cookie string for paging. Keep previous PagingCookie value for next iteration.
-
-
-
-
- AllRows
-
- System.Management.Automation.ParameterAttribute
- System.Management.Automation.ArgumentTypeConverterAttribute
-
-
- By default the first 5000 rows are returned, this switch will bring back all results regardless of how many
-
-
-
-
-
-
- Example 1
- Get-CrmRecordsByFetch -conn $conn -Fetch @"
-<fetch version="1.0" output-format="xml-platform" mapping="logical" distinct="false" no-lock="true">
-<entity name="account">
- <attribute name="name" />
- <attribute name="primarycontactid" />
- <attribute name="telephone1" />
- <attribute name="accountid" />
- <order attribute="name" descending="false" />
-</entity>
-</fetch>
-"@
- This example retrieves account records by using FetchXML and results contains CrmRecords, PagingCookie and NextPage.
-Please note that copying and pasting above example may not work due to multiline issue. Please remove all whitespace before last @"
-
-
-
- Example 2
- $result = Get-CrmRecordsByFetch @"
-<fetch version="1.0" output-format="xml-platform" mapping="logical" distinct="false" no-lock="true">
-<entity name="account">
- <attribute name="name" />
- <attribute name="primarycontactid" />
- <attribute name="telephone1" />
- <attribute name="accountid" />
- <order attribute="name" descending="false" />
-</entity>
-</fetch>
-"@
-PS C:\>$result.CrmRecords
- This example stores retrieved result into $result variable, then show records by CrmRecords property.
-When omitting parameter names, you do not provide $conn, cmdlets automatically finds it.
-
-
-
- Example 3
- $result1 = Get-CrmRecordsByFetch @"
-<fetch version="1.0" output-format="xml-platform" mapping="logical" distinct="false" no-lock="true">
-<entity name="contact">
- <attribute name="fullname" />
-</entity>
-</fetch>
-"@
-
-PS C:\>$result1.CrmRecords.Count
-5000
-
-PS C:\>$result1.NextPage
-True
-
-PS C:\>$result1.PagingCookie
-<cookie page="1"><contactid last="{890FDA88-4217-E511-80DB-C4346BC42D18}" first="{E1D47674-4017-E511-80DB-C4346BC42D18}" /></cookie>
-
-PS C:\>$result2 = Get-CrmRecordsByFetch -conn $conn -Fetch @"
-<fetch version="1.0" output-format="xml-platform" mapping="logical" distinct="false" no-lock="true">
-<entity name="contact">
- <attribute name="fullname" />
-</entity>
-</fetch>
-"@ -TopCount 5000 -PageNumber 2 -PageCookie $result1.PagingCookie
-
-PS C:\>$result2.CrmRecords.Count
-453
-
-PS C:\>$result2.NextPage
-False
- This example stores retrieved result into $result1 variable, then use $result1.PagingCookie data for next iteration.
-FetchXML is exactly same but specifying additional Parameters for second command.
-
-
-
-
-
- false
-
-
- Get-CrmRecordsByViewName
-
- Get-CrmRecordsByViewName [-conn <CrmServiceClient>] [-ViewName] <String> [[-IsUserView] <Boolean>] [[-AllRows] <SwitchParameter>] [[-TopCount] <Int32>]
-
-
- Retrieves CRM records by using View Name.
-
- The Get-CrmRecordsByViewName cmdlet lets you retrieve CRM records by using View Name. You can use IsUserView parameter to select SystemView or UserView.
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- conn
-
- System.Management.Automation.ParameterAttribute
- System.Management.Automation.ArgumentTypeConverterAttribute
-
-
- A connection to your CRM organization. Use $conn = Get-CrmConnection <Parameters> to generate it.
-
-
-
-
- ViewName
-
- System.Management.Automation.ParameterAttribute
- System.Management.Automation.ArgumentTypeConverterAttribute
-
-
- A name of a view, which contains desired FetchXML.
-
-
-
-
- IsUserView
-
- System.Management.Automation.ParameterAttribute
- System.Management.Automation.ArgumentTypeConverterAttribute
-
-
- Speficy $True if the view is User View.
-
-
-
-
- AllRows
-
- System.Management.Automation.ParameterAttribute
- System.Management.Automation.ArgumentTypeConverterAttribute
-
-
- Indicates you would like to bring back data from all pages (all available rows in CRM, this function will take longer to execute, but will include all the data rather than the first 5000 rows)
-
-
-
- TopCount
-
- System.Management.Automation.ParameterAttribute
- System.Management.Automation.ArgumentTypeConverterAttribute
-
-
- Maximum number of records to retrieve
-
-
-
-
-
- Example 1
- Get-CrmRecordsByViewName -conn $conn -ViewName "Active Accounts"
-
- This example retrieves account records by using "Active Accounts" system view.
-
-
-
-
- Example 2
- Get-CrmRecordsByViewName "My Custom Account View" $True
-
- This example retrieves account records by using "My Custom Account View" user view by omitting parameter names.
-When omitting parameter names, you do not provide $conn, cmdlets automatically finds it.
-
-
-
-
-
- false
-
-
- Get-CrmRecordsCount
-
- Get-CrmRecordsCount [-conn <CrmServiceClient>] [-EntityLogicalName] <String>
-
-
- Retrieves CRM entity total record counts.
-
- The Get-CrmRecordsCount cmdlet lets you retrieve CRM entity total record counts.
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- conn
-
- System.Management.Automation.ParameterAttribute
- System.Management.Automation.ArgumentTypeConverterAttribute
-
-
- A connection to your CRM organization. Use $conn = Get-CrmConnection <Parameters> to generate it.
-
-
-
-
- EntityLogicalName
-
- System.Management.Automation.AliasAttribute
- System.Management.Automation.ParameterAttribute
- System.Management.Automation.ArgumentTypeConverterAttribute
-
-
- EntityName
-
- A logicalname for an Entity to retrieve. i.e.)account, contact, lead, etc..
-
-
-
-
-
-
- Example 1
- Get-CrmRecordsCount -conn $conn -EntityLogicalName account
-
- This example retrieves total number of Account entity records.
-
-
-
-
- Example 2
- Get-CrmRecordsCount account
-
- This example retrieves total number of Account entity records by omitting parameter names.
-When omitting parameter names, you do not provide $conn, cmdlets automatically finds it.
-
-
-
-
-
- false
-
-
- Get-CrmSdkMessageProcessingStepsForPluginAssembly
-
- Get-CrmSdkMessageProcessingStepsForPluginAssembly [-conn <CrmServiceClient>] [-PluginAssemblyName] <String> [[-OnlyCustomizable] <SwitchParameter>]
-
-
- Retrieves all registered steps for Plugin.
-
- The Get-CrmSdkMessageProcessingStepsForPluginAssembly cmdlet lets you retrieve all registered steps for Plugin.
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- conn
-
- System.Management.Automation.ParameterAttribute
- System.Management.Automation.ArgumentTypeConverterAttribute
-
-
- A connection to your CRM organization. Use $conn = Get-CrmConnection <Parameters> to generate it.
-
-
-
-
- PluginAssemblyName
-
- System.Management.Automation.ParameterAttribute
- System.Management.Automation.ArgumentTypeConverterAttribute
-
-
- A plugin assembly name.
-
-
-
-
- OnlyCustomizable
-
- System.Management.Automation.ParameterAttribute
- System.Management.Automation.ArgumentTypeConverterAttribute
-
-
- By specifying this swich returns only customizable steps.
-
-
-
-
-
-
- Example 1
- Get-CrmSdkMessageProcessingStepsForPluginAssembly -conn $conn -PluginAssemblyName YourPluginAssemblyName
-
- This example retrieves all registered steps for the plugin assembly.
-
-
-
-
- Example 2
- Get-CrmSdkMessageProcessingStepsForPluginAssembly -conn $conn -PluginAssemblyName YourPluginAssemblyName -OnlyCustomizable
-
- This example retrieves all registered customizable steps for the plugin assembly.
-
-
-
-
- Example 3
- Get-CrmSdkMessageProcessingStepsForPluginAssembly -PluginAssemblyName YourPluginAssemblyName
-
- This example retrieves all registered steps for the plugin assembly by omitting parameter names.
-When omitting parameter names, you do not provide $conn, cmdlets automatically finds it.
-
-
-
-
-
- false
-
-
- Get-CrmSystemSettings
-
- Get-CrmSystemSettings [[-conn] <CrmServiceClient>] [-ShowDisplayName]
-
-
- Retrieves CRM Organization's System Settings.
-
- The Get-CrmSystemSettings cmdlet lets you retrieve CRM Organization's System Settings.
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- conn
-
- System.Management.Automation.ParameterAttribute
- System.Management.Automation.ArgumentTypeConverterAttribute
-
-
- A connection to your CRM organization. Use $conn = Get-CrmConnection <Parameters> to generate it.
-
-
-
-
- ShowDisplayName
-
- System.Management.Automation.ParameterAttribute
- System.Management.Automation.ArgumentTypeConverterAttribute
-
-
- When you specify the ShowDisplayName switch, you see DisplayName for all fields, otherwise you see SchemaName.
-
-
-
-
-
-
- Example 1
- This example retrieves CRM Organization's System Settings.
-
-
-
-
-
- Example 2
- Get-CrmSystemSettings -conn $conn -ShowDisplayName
-
- This example retrieves CRM Organization's System Settings and show DisplayName for fields.
-
-
-
-
- Example 3
- Get-CrmSystemSettings
-
- This example retrieves CRM Organization's System Settings by omitting parameter names.
-When omitting parameter names, you do not provide $conn, cmdlets automatically finds it.
-
-
-
- Example 4
- Get-CrmSystemSettings -ShowDisplayName
-
- Allow the showing tablet application notification bars in a browser. : Yes
-Presence Enabled : Yes
-Default Email Settings:Incoming Email : Server-Side Synchronization or Email Router
-Default Email Settings:Outgoing Email : Server-Side Synchronization or Email Router
-Default Email Settings:Appointments, Contacts, and Tasks : Microsoft Dynamics CRM for Outlook
-...
-
-
-
-
-
- false
-
-
- Get-CrmTimeZones
-
- Get-CrmTimeZones [[-conn] <CrmServiceClient>]
-
-
- Retrieves CRM Timezone information.
-
- The Get-CrmTimeZones cmdlet lets you retrieve CRM Timezone information.
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- conn
-
- System.Management.Automation.ParameterAttribute
- System.Management.Automation.ArgumentTypeConverterAttribute
-
-
- A connection to your CRM organization. Use $conn = Get-CrmConnection <Parameters> to generate it.
-
-
-
-
-
-
- Example 1
- Get-CrmTimeZones -conn $conn
-
- This example retrieves timezone information.
-
-
-
-
- Example 2
- Get-CrmTimeZones
-
- This example retrieves timezone information by omitting parameter names.
-When omitting parameter names, you do not provide $conn, cmdlets automatically finds it.
-
-
-
-
-
- false
-
-
- Get-CrmTraceAlerts
-
- Get-CrmTraceAlerts [[-conn] <CrmServiceClient>]
-
-
- Retrieves alert notifications from CRM organization.
-
- The Get-CrmTraceAlerts cmdlet lets you retrieve alert notifications from CRM organization.
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- conn
-
- System.Management.Automation.ParameterAttribute
- System.Management.Automation.ArgumentTypeConverterAttribute
-
-
- A connection to your CRM organization. Use $conn = Get-CrmConnection <Parameters> to generate it.
-
-
-
-
-
-
- Example 1
- Get-CrmTraceAlerts -conn $conn
-
- This example retrieves alert notifications.
-
-
-
-
- Example 2
- Get-CrmTraceAlerts
-
- This example retrieves alert notifications by omitting parameter names.
-When omitting parameter names, you do not provide $conn, cmdlets automatically finds it.
-
-
-
- Example 3
- Get-CrmTraceAlerts | % {$_.CrmRecords} | select text,level
-
- This example retrieves alert notifications and display its text and level.
-
-
-
-
-
-
- false
-
-
- Get-CrmUserPrivileges
-
- Get-CrmUserPrivileges [-conn <CrmServiceClient>] [-UserId] <String>
-
-
- Retrieves privileges a CRM User has.
-
- The Get-CrmUserPrivileges cmdlet lets you retrieve privileges a CRM User has. Result set contains following properties.
-
-Depth: Accumulated privilege Depth
-PrivilegeId: Privilege ID
-PrivilegeName: Privilege Name
-Origin: Indicate where the privilege comes from. RoleName:Depth format
-PrincipalType: User or Team
-PrincipalName: User's fullname or Team's name
-BusinessUnitName: User's or Team's BusinessUnitName
-
-
-
-
-
-
-
-
-
-
-
-
-
- conn
-
- System.Management.Automation.ParameterAttribute
- System.Management.Automation.ArgumentTypeConverterAttribute
-
-
- A connection to your CRM organization. Use $conn = Get-CrmConnection <Parameters> to generate it.
-
-
-
-
- UserId
-
- System.Management.Automation.ParameterAttribute
- System.Management.Automation.ArgumentTypeConverterAttribute
-
-
- An Id (guid) of CRM User.
-
-
-
-
-
-
- Example 1
- Get-CrmUserPrivileges -conn $conn -UserId f9d40920-7a43-4f51-9749-0549c4caf67d
-
- This example retrieves privileges assigned to the CRM User.
-
-
-
-
- Example 2
- Get-CrmUserPrivileges f9d40920-7a43-4f51-9749-0549c4caf67d
-
- This example retrieves privileges assigned to the CRM User by omitting parameter names.
-When omitting parameter names, you do not provide $conn, cmdlets automatically finds it.
-
-
-
-
-
- false
-
-
- Get-CrmUserSecurityRoles
-
- Get-CrmUserSecurityRoles [-conn <CrmServiceClient>] [-UserId] <String> [-IncludeTeamRoles]
-
-
- Retrieves Security Roles assigned to a CRM User.
-
- The Get-CrmUserSecurityRoles cmdlet lets you retrieve Security Roles assigned to a CRM User.
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- conn
-
- System.Management.Automation.ParameterAttribute
- System.Management.Automation.ArgumentTypeConverterAttribute
-
-
- A connection to your CRM organization. Use $conn = Get-CrmConnection <Parameters> to generate it.
-
-
-
-
- UserId
-
- System.Management.Automation.ParameterAttribute
- System.Management.Automation.ArgumentTypeConverterAttribute
-
-
- An Id (guid) of CRM User.
-
-
-
-
- IncludeTeamRoles
-
- System.Management.Automation.ParameterAttribute
- System.Management.Automation.ArgumentTypeConverterAttribute
-
-
- When you specify the IncludeTeamRoles switch, Security Roles from teams are also returned.
-
-
-
-
-
-
- Example 1
- Get-CrmUserSecurityRoles -conn $conn -UserId f9d40920-7a43-4f51-9749-0549c4caf67d
-
- This example retrieves Security Roles assigned to the CRM User.
-
-
-
-
- Example 2
- Get-CrmUserSecurityRoles -conn $conn -UserId f9d40920-7a43-4f51-9749-0549c4caf67d -IncludeTeamRoles
-
- This example retrieves Security Roles assigned to the CRM User and Teams which the CRM User belongs to.
-
-
-
- Example 3
- Get-CrmUserSecurityRoles f9d40920-7a43-4f51-9749-0549c4caf67d -IncludeTeamRoles
-
- This example retrieves Security Roles assigned to the CRM User and Teams which the CRM User belongs to by omitting parameter names.
-When omitting parameter names, you do not provide $conn, cmdlets automatically finds it.
-
-
-
-
-
- false
-
-
- Get-CrmUserSettings
-
- Get-CrmUserSettings [-conn <CrmServiceClient>] [-UserId] <String> [-Fields] <String[]>
-
-
- Retrieves CRM user's settings.
-
- The Get-CrmUserSettings cmdlet lets you retrieve CRM user's settings.
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- conn
-
- System.Management.Automation.ParameterAttribute
- System.Management.Automation.ArgumentTypeConverterAttribute
-
-
- A connection to your CRM organization. Use $conn = Get-CrmConnection <Parameters> to generate it.
-
-
-
-
- UserId
-
- System.Management.Automation.ParameterAttribute
- System.Management.Automation.ArgumentTypeConverterAttribute
-
-
- An Id (guid) of CRM User.
-
-
-
-
- Fields
-
- System.Management.Automation.ParameterAttribute
- System.Management.Automation.ArgumentTypeConverterAttribute
-
-
- A List of field logicalnames. Use "fieldname1, fieldname2, fieldname3" syntax to specify Fields, or use "*" to retrieve all fields (not recommended for performance reason.)
-
-
-
-
-
-
- Example 1
- Get-CrmUserSettings -conn $conn -UserId f9d40920-7a43-4f51-9749-0549c4caf67d -Fields *
-
- This example retrieves all fields from specified User's UserSettings.
-
-
-
-
- Example 2
- Get-CrmUserSettings (Get-MyCrmUserId) *
-
- This example retrieves all fields from login User's UserSettings by omitting parameter names.
-When omitting parameter names, you do not provide $conn, cmdlets automatically finds it.
-
-
-
-
-
- false
-
-
- Get-MyCrmUserId
-
- Get-MyCrmUserId [[-conn] <CrmServiceClient>]
-
-
- Retrieves login user's CRM UserId (guid).
- The Get-MyCrmUserId cmdlet retrieves login user's CRM UserId.
-
-
-
-
-
-
-
-
-
-
-
-
-
- conn
-
- System.Management.Automation.ParameterAttribute
- System.Management.Automation.ArgumentTypeConverterAttribute
-
-
- A connection to your CRM organization. Use $conn = Get-CrmConnection <Parameters> to generate it.
-
-
-
-
-
- Example 1
- Get-MyCrmUserId -conn $conn
- This example returns login user's CRM UserId.
-
-
-
- Example 2
- Get-MyCrmUserId
- This example returns login user's CRM UserId by ommiting -conn parameter.
-To omit conn parameter, you need creating $conn in advance, then cmdlets automatically finds it.
-
-
-
-
-
- false
-
-
- Import-CrmSolution
-
- Import-CrmSolution [-conn <CrmServiceClient>] [-SolutionFilePath] <String> [[-ActivatePlugIns] <SwitchParameter>] [[-OverwriteUnManagedCustomizations] <SwitchParameter>] [[-SkipDependancyOnProductUpdateCheckOnInstall] <SwitchParameter>] [[-PublishChanges] <SwitchParameter>] [[-MaxWaitTimeInSeconds] <Int64>] [[-ImportAsHoldingSolution] <SwitchParameter>] [[-AsyncOperationImportMethod] <SwitchParameter>]
-
-
- Imports solution file to CRM Organization.
-NOTE: Under most circumstances you should use Import-CrmSolutionAsync instead of this cmdlet
- The Import-CrmSolution cmdlet lets you import solution file to CRM Organization and returns Job Id. You can use the Job Id to check import progress.
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- conn
-
- System.Management.Automation.ParameterAttribute
- System.Management.Automation.ArgumentTypeConverterAttribute
-
-
- A connection to your CRM organization. Use $conn = Get-CrmConnection <Parameters> to generate it.
-
-
-
-
- SolutionFilePath
-
- System.Management.Automation.ParameterAttribute
- System.Management.Automation.ArgumentTypeConverterAttribute
-
-
- A file path to solution zip file.
-
-
-
- ActivatePlugIns
-
- System.Management.Automation.ParameterAttribute
- System.Management.Automation.ArgumentTypeConverterAttribute
-
-
- Specify the parameter to active plug-ins when importing solution.
-
-
-
- OverwriteUnManagedCustomizations
-
- System.Management.Automation.ParameterAttribute
- System.Management.Automation.ArgumentTypeConverterAttribute
-
-
- Specify the parameter to overwrite conflicting unmanaged customizations when importing solution.
-
-
-
-
- SkipDependancyOnProductUpdateCheckOnInstall
-
- System.Management.Automation.ParameterAttribute
- System.Management.Automation.ArgumentTypeConverterAttribute
-
-
- Specify the parameter to skip dependency check when importing solution.
-
-
-
-
- PublishChanges
-
- System.Management.Automation.ParameterAttribute
- System.Management.Automation.ArgumentTypeConverterAttribute
-
-
- Specify the parameter to publish all customizations (applicable only for unmanaged solution)
-
-
-
-
- MaxWaitTimeInSeconds
-
- System.Management.Automation.ParameterAttribute
- System.Management.Automation.ArgumentTypeConverterAttribute
-
-
- Specify the parameter to override the default maximum 900 seconds (15 minutes) to wait for an imported solution to complete.
-
-
-
-
- ImportAsHoldingSolution
-
- System.Management.Automation.ParameterAttribute
- System.Management.Automation.ArgumentTypeConverterAttribute
-
-
- Import as a holding solution
-
-
-
- AsyncOperationImportMethod
-
- System.Management.Automation.ParameterAttribute
- System.Management.Automation.ArgumentTypeConverterAttribute
-
-
- Attempt to import using an async & poll method
-
-
-
-
-
- Example 1
- Import-CrmSolution -conn $conn -SolutionFilePath "C:\SampleSolution_1_0_0_0.zip"
- This example imports solution and returns JobId.
-
-
-
-
- Example 2
- Import-CrmSolution "C:\SampleSolution_1_0_0_0.zip" $True -AsyncOperationImportMethod
- This example imports solution by activating plug-ins and returns JobId by omitting parameter names.
-When omitting parameter names, you do not provide $conn, cmdlets automatically finds it.
-Also, the Async Operation Import will be used instead of waiting for a response, which is preferred.
-
-
-
-
-
- false
-
-
- Import-CrmSolutionTranslation
-
- Import-CrmSolutionTranslation [-conn <CrmServiceClient>] [-TranslationFileName] <String> [[-PublishChanges] <SwitchParameter>]
-
-
- Imports a translation to a solution.
-
- The Import-CrmSolutionTranslation cmdlet lets you export a translation to a solution.
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- conn
-
- System.Management.Automation.ParameterAttribute
- System.Management.Automation.ArgumentTypeConverterAttribute
-
-
- A connection to your CRM organization. Use $conn = Get-CrmConnection <Parameters> to generate it.
-
-
-
-
- TranslationFileName
-
- System.Management.Automation.ParameterAttribute
- System.Management.Automation.ArgumentTypeConverterAttribute
-
-
- A file name and path of importing solution translation zip file.
-
-
-
-
- PublishChanges
-
- System.Management.Automation.ParameterAttribute
- System.Management.Automation.ArgumentTypeConverterAttribute
-
-
- Specify the parameter to publish all customizations.
-
-
-
-
-
-
- Example 1
- Import-CrmSolutionTranslation -conn $conn -TranslationZipFileName "C:\temp\CrmTranslations_MySolution_1_0_0_0.zip"
-
- This example imports translation file "CrmTranslations_MySolution_1_0_0_0".
-
-
-
-
- Example 2
- Import-CrmSolutionTranslation -conn $conn -TranslationZipFileName "C:\temp\CrmTranslations_MySolution_1_0_0_0.zip"
-
- This example imports translation file "CrmTranslations_MySolution_1_0_0_0" by omitting $conn parameter.
-When omitting $conn parameter, cmdlets automatically finds it.
-
-
-
- Example 3
- Import-CrmSolutionTranslation -conn $conn -TranslationZipFileName "C:\temp\CrmTranslations_MySolution_1_0_0_0.zip" -PublishChanges
-
- This example imports translation file "CrmTranslations_MySolution_1_0_0_0" and publish all customizations.
-
-
-
-
-
-
- false
-
-
- Invoke-CrmRecordWorkflow
-
- Invoke-CrmRecordWorkflow [-conn <CrmServiceClient>] [-CrmRecord <PSObject>] [-WorkflowName <String>]
- Invoke-CrmRecordWorkflow [-conn <CrmServiceClient>] [-CrmRecord] <PSObject> [-WorkflowId <String>]
- Invoke-CrmRecordWorkflow [-conn <CrmServiceClient>] [-EntityId <String>] [-WorkflowName] <String>
- Invoke-CrmRecordWorkflow [-conn <CrmServiceClient>] [-EntityId] <String> [-WorkflowId] <String>
-
-
- Runs an on-demand workflow for a record.
- The Invoke-CrmRecordWorkflow cmdlet lets you run an on-demand workflow for a record.
-
-There are two ways to specify records.
-
-1. Pass record's Id.
-2. Get a record object by using Get-CrmRecord/Get-CrmRecords cmdlets, and pass it.
-
-You can specify on-demand workflow by using its name.
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- conn
-
- System.Management.Automation.ParameterAttribute
- System.Management.Automation.ArgumentTypeConverterAttribute
-
-
- A connection to your CRM organization. Use $conn = Get-CrmConnection <Parameters> to generate it.
-
-
-
- CrmRecord
-
- System.Management.Automation.ParameterAttribute
- System.Management.Automation.ParameterAttribute
- System.Management.Automation.ArgumentTypeConverterAttribute
-
-
- A record object which is obtained via Get-CrmRecord/Get-CrmRecords. When you pass CrmRecord, then you don't use Id.
-
-
-
- WorkflowName
-
- System.Management.Automation.ParameterAttribute
- System.Management.Automation.ParameterAttribute
- System.Management.Automation.ArgumentTypeConverterAttribute
-
-
- An on-demand workflow name.
-
-
-
- WorkflowId
-
- System.Management.Automation.ParameterAttribute
- System.Management.Automation.ParameterAttribute
- System.Management.Automation.ArgumentTypeConverterAttribute
-
-
- The GUID for any given workflow you want to execute
-
-
-
- EntityId
-
- System.Management.Automation.AliasAttribute
- System.Management.Automation.ParameterAttribute
- System.Management.Automation.ParameterAttribute
- System.Management.Automation.ArgumentTypeConverterAttribute
-
-
- Id
- StringId
-
- An Id (guid) of the record
-
-
-
-
-
- Example 1
- Invoke-CrmRecordWorkflow -conn $conn -EntityId faff5970-6317-e511-80da-c4346bc43d94 -WorkflowName "Sample Workflow for Account"
- This example runs an on-demand workflow named "Sample Workflow for Account" for an account.
-
-
-
- Example 2
- Invoke-CrmRecordWorkflow faff5970-6317-e511-80da-c4346bc43d94 "Sample Workflow for Account"
- This example runs an on-demand workflow named "Sample Workflow for Account" for an account by omitting parameter names.
-When omitting parameter names, you do not provide $conn, cmdlets automatically finds it.
-
-
-
- Example 3
- PS C:\>$account = Get-CrmRecord account 00005a70-6317-e511-80da-c4346bc43d94 name
-
-PS C:\>Invoke-CrmRecordWorkflow -CrmRecords $account -WorkflowName "Sample Workflow for Account"
- This example runs an on-demand workflow named "Sample Workflow for Account" for an account by omitting parameter names.
-
-
-
-
-
- false
-
-
- Invoke-CrmWhoAmI
-
- Invoke-CrmWhoAmI [[-conn] <CrmServiceClient>]
-
-
- Executes WhoAmI Organization Request and returns current user's Id (guid), belonging BusinessUnit Id (guid) and CRM Organization Id (guid).
-
- The Invoke-CrmWhoAmI cmdlet lets you execute WhoAmI request and obtain UserId, BusinessUnitId and OrganizationId.
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- conn
-
- System.Management.Automation.ParameterAttribute
- System.Management.Automation.ArgumentTypeConverterAttribute
-
-
- A connection to your CRM organization. Use $conn = Get-CrmConnection <Parameters> to generate it.
-
-
-
-
-
-
- Example 1
- Invoke-CrmWhoAmI -conn $conn
-
- This example executes WhoAmI organization request and returns current user's Id (guid), belonging BusinessUnit Id (guid) and CRM Organization Id (guid).
-
-
-
-
- Example 2
- Invoke-CrmWhoAmI
-
- This example executes WhoAmI by omitting parameters names.
-When omitting parameter names, you do not provide $conn, cmdlets automatically finds it.
-
-
-
-
-
- false
-
-
- Move-CrmRecordToQueue
-
- Move-CrmRecordToQueue [-conn <CrmServiceClient>] [-CrmRecord] <PSObject> [-QueueName] <String> [-WorkingUserId] <Guid> [[-SetWorkingByUser] <Boolean>]
- Move-CrmRecordToQueue [-conn <CrmServiceClient>] [-EntityLogicalName] <String> [-Id] <Guid> [-QueueName] <String> [-WorkingUserId] <Guid> [[-SetWorkingByUser] <Boolean>]
-
-
- Move a CRM record to a Queue
- The Move-CrmRecordToQueue cmdlet lets you move a record to a queue.
-
-There are two ways to specify a record.
-1. Pass EntityLogicalName and record's Id.
-2. Get a record object by using Get-CrmRecord/Get-CrmRecords cmdlets, then pass it.
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- conn
-
- System.Management.Automation.ParameterAttribute
- System.Management.Automation.ArgumentTypeConverterAttribute
-
-
- A connection to your CRM organization. Use $conn = Get-CrmConnection <Parameters> to generate it.
-
-
-
- CrmRecord
-
- System.Management.Automation.ParameterAttribute
- System.Management.Automation.ArgumentTypeConverterAttribute
-
-
- A record object which is obtained via Get-CrmRecord/Get-CrmRecords. When you pass CrmRecord, then you don't use EntityLogicalName/Id.
-
-
-
- QueueName
-
- System.Management.Automation.ParameterAttribute
- System.Management.Automation.ArgumentTypeConverterAttribute
-
-
- Queue's Name to move the record.
-
-
-
- WorkingUserId
-
- System.Management.Automation.ParameterAttribute
- System.Management.Automation.ArgumentTypeConverterAttribute
-
-
- An Id (guid) of SystemUser who works on the queue item.
-
-
-
- SetWorkingByUser
-
- System.Management.Automation.ParameterAttribute
- System.Management.Automation.ArgumentTypeConverterAttribute
-
-
- Specify if the record needs to be marked as WorkingByUser.
-
-
-
- EntityLogicalName
-
- System.Management.Automation.ParameterAttribute
- System.Management.Automation.ArgumentTypeConverterAttribute
-
-
- A logicalname for an Entity to move. i.e.)accout, contact, lead, etc..
-
-
-
- Id
-
- System.Management.Automation.ParameterAttribute
- System.Management.Automation.ArgumentTypeConverterAttribute
-
-
- An Id (guid) of the record
-
-
-
-
-
- Example 1
- Move-CrmRecordToQueue -conn $conn -EntityLogicalName incident -Id 1e005a70-6317-e511-80da-c4346bc43d94 -QueueName "Support Queue" -WorkingUserId f9d40920-7a43-4f51-9749-0549c4caf67d
- This example moves an incident (Case) record to "Support Queue" queue and assigned it to a User as WorkingUser.
-
-
-
- Example 2
- Move-CrmRecordToQueue incident 1e005a70-6317-e511-80da-c4346bc43d94 "Support Queue" f9d40920-7a43-4f51-9749-0549c4caf67d $True
- This example moves an incident (Case) record to "Support Queue" queue and assigned it to a User as WorkingUser and mark it as User Working
-When omitting parameter names, you do not provide $conn, cmdlets automatically finds it.
-
-
-
- Example 3
- PS C:\>$incident = Get-CrmRecord incident 20005a70-6317-e511-80da-c4346bc43d94 title
-
-PS C:\>Move-CrmRecordToQueue $incident "Support Queue" f9d40920-7a43-4f51-9749-0549c4caf67d $True
- This example retrieves and store an incident record, then pass it to Move-CrmRecordToQueue.
-
-
-
-
-
- false
-
-
- New-CrmEntityReference
-
- New-CrmEntityReference [-EntityLogicalName] <String> [-Id] <Guid>
-
-
- Instantiates EntityReference type object.
- The New-CrmEntityReference cmdlet lets you instantiates EntityReference type object.
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- EntityLogicalName
-
- System.Management.Automation.ParameterAttribute
- System.Management.Automation.ArgumentTypeConverterAttribute
-
-
- A logicalname for an Entity to update. i.e.)account, contact, lead, etc..
-
-
-
-
- Id
-
- System.Management.Automation.ParameterAttribute
- System.Management.Automation.ArgumentTypeConverterAttribute
-
-
- An Id (guid) of the record
-
-
-
-
-
-
- Example 1
- New-CrmEntityReference -EntityLogicalName account -Id 1df8d93d-1f18-e511-80da-c4346bc43d94
- This example instantiates CrmEntityReference object for an account record.
-
-
-
- Example 2
- New-CrmEntityReference account 1df8d93d-1f18-e511-80da-c4346bc43d94
- This example instantiates CrmEntityReference object for an account record by omitting parameter names.
-
-
-
-
-
- false
-
-
- New-CrmMoney
-
- New-CrmMoney [-Value] <Double>
-
-
- Instantiates Money type object.
-
- The New-CrmMoney cmdlet lets you instantiates Money type object.
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Value
-
- System.Management.Automation.ParameterAttribute
- System.Management.Automation.ArgumentTypeConverterAttribute
-
-
- Money Value.
-
-
-
-
-
- Example 1
- New-CrmMoney -Value 1000.01
- This example instantiates Money object with Value of 1,000.01 in whatever currency is applicable given the record configuration &/or CRM Settings.
-
-
-
-
-
-
- false
-
-
- New-CrmOptionSetValue
-
- New-CrmOptionSetValue [-Value] <Int32>
-
-
- Instantiates OptionSetValue type object.
-
- The New-CrmOptionSetValue cmdlet lets you instantiates OptionSetValue type object.
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Value
-
- System.Management.Automation.ParameterAttribute
- System.Management.Automation.ArgumentTypeConverterAttribute
-
-
- OptionSetValue Value.
-
-
-
-
-
-
- Example 1
- New-CrmOptionSetValue -Value 20
- This example instantiates OptionSetValue object with Value of 20.
-
-
-
-
-
- false
-
-
- New-CrmRecord
-
- New-CrmRecord [-conn <CrmServiceClient>] [-EntityLogicalName] <String> [-Fields] <Hashtable>
- New-CrmRecord [-conn <CrmServiceClient>] [-CrmRecord] <PSObject> [[-PreserveCrmRecordId] <SwitchParameter>]
-
-
- Creates a new CRM record by specifying field name/value set, and returns record guid.
- The New-CrmRecord cmdlet lets you create a record to your CRM organization.
-
-Use @{"field logical name"="value"} syntax to create Fields, and make sure you specify correct type of value for the field.
-
-You can use Get-CrmEntityAttributeMetadata cmdlet and check AttributeType to see the field type. In addition, for CRM specific types, you can use New-CrmMoney, New-CrmOptionSetValue or New-CrmEntityReference cmdlets.
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- conn
-
- System.Management.Automation.ParameterAttribute
- System.Management.Automation.ArgumentTypeConverterAttribute
-
-
- A connection to your CRM organization. Use $conn = Get-CrmConnection <Parameters> to generate it.
-
-
-
- EntityLogicalName
-
- System.Management.Automation.ParameterAttribute
- System.Management.Automation.ArgumentTypeConverterAttribute
-
-
- A logicalname for an Entity to create. i.e.) account, contact, lead, etc..
-
-
-
- Fields
-
- System.Management.Automation.ParameterAttribute
- System.Management.Automation.ArgumentTypeConverterAttribute
-
-
- A List of field name/value pair. Use @{"field logical name"="value"} syntax to create Fields, and make sure you specify correct type of value for the field.
-You can use Get-CrmEntityAttributeMetadata cmdlet and check AttributeType to see the field type. In addition, for CRM specific types, you can use New-CrmMoney, New-CrmOptionSetValue or New-CrmEntityReference cmdlets.
-
-
-
- CrmRecord
-
- System.Management.Automation.ParameterAttribute
- System.Management.Automation.ArgumentTypeConverterAttribute
-
-
- A record object which is obtained via Get-CrmRecord/Get-CrmRecords. When you pass CrmRecord, then you don't use EntityLogicalName/Fields
-
-
-
- PreserveCrmRecordId
-
- System.Management.Automation.ParameterAttribute
- System.Management.Automation.ArgumentTypeConverterAttribute
-
-
-
-
-
-
-
-
- Example 1
- New-CrmRecord -conn $conn -EntityLogicalName account -Fields @{"name"="account name";"telephone1"="555-5555"}
- This example creates an account record and set value for account and telephone1 fields.
-
-
-
- Example 2
- New-CrmRecord account @{"name"="account name";"industrycode"=New-CrmOptionSetValue -Value 1}
- This example creates an account record by specifying OptionSetValue to IndustryCode field by omitting parameter names.
-When omitting parameter names, you do not provide $conn, cmdlets automatically finds it.
-
-
-
- Example 3
- New-CrmRecord account @{"name"="account name";"overriddencreatedon"=[datetime]"2000-01-01"}
- This example creates an account record by specifying past date for CreatedOn. You can create DateTime object by casting like this Example or use Get-Date cmdlets.
-
-
-
-
- Example 4
- PS C:\>$parentId = New-CrmRecord account @{"name"="parent account name"}
-
-PS C:\>$parentReference = New-CrmEntityReference -EntityLogicalName account -Id $parentId
-
-PS C:\>$childId = New-CrmRecord account @{"name"="child account name";"parentaccountid"=$parentReference}
- This example creates an account record, then assign the created account as Parent Account field to second account record.
-
-
-
- Example 5
- PS C:\>$account = Get-CrmRecord -conn $conn -EntityLogicalName account -Id $accountid -Fields *
-
-PS C:\>New-CrmRecord -conn $conn -CrmRecord $account
- This example get record by Get-CrmRecord, then pass it to New-CrmRecord to create another record.
-
-
-
-
-
- false
-
-
- Publish-CrmAllCustomization
-
- Publish-CrmAllCustomization [[-conn] <CrmServiceClient>]
-
-
- Publishes all customizations for a CRM Organization.
-
- The Publish-CrmAllCustomization cmdlet lets you publish all customizations.
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- conn
-
- System.Management.Automation.ParameterAttribute
- System.Management.Automation.ArgumentTypeConverterAttribute
-
-
- A connection to your CRM organization. Use $conn = Get-CrmConnection <Parameters> to generate it.
-
-
-
-
-
-
- Example 1
- Publish-CrmAllCustomization -conn $conn
-
- This example publishes all customizations.
-
-
-
-
- Example 2
- Publish-CrmAllCustomization
-
- This example publishes all customizations by omitting parameters names.
-When omitting parameter names, you do not provide $conn, cmdlets automatically finds it.
-
-
-
-
-
- false
-
-
- Publish-CrmEntity
-
- Publish-CrmEntity [-conn <CrmServiceClient>] [-EntityLogicalName] <String>
-
-
- Publishes customization for an Entity.
-
- The Publish-CrmEntity cmdlet lets you publish customization for an Entity.
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- conn
-
- System.Management.Automation.ParameterAttribute
- System.Management.Automation.ArgumentTypeConverterAttribute
-
-
- A connection to your CRM organization. Use $conn = Get-CrmConnection <Parameters> to generate it.
-
-
-
-
- EntityLogicalName
-
- System.Management.Automation.ParameterAttribute
- System.Management.Automation.ArgumentTypeConverterAttribute
-
-
- A logicalname for Entity. i.e.)account, contact, lead, etc..
-
-
-
-
-
-
- Example 1
- Publish-CrmEntity -conn $conn -EntityLogicalName account
- This example publishes customization for Account Entity.
-
-
-
- Example 2
- Publish-CrmEntity lead
- This example publishes customization for Lead Entity by omitting parameter names.
-When omitting parameter names, you do not provide $conn, cmdlets automatically finds it.
-
-
-
-
-
- false
-
-
- Remove-CrmEntityMetadataCache
-
- Remove-CrmEntityMetadataCache [-conn <CrmServiceClient>] [[-EntityLogicalName] <String>]
-
-
- Removes metadata cache for an Entity.
-
- The Remove-CrmEntityMetadataCache cmdlet lets you remove metadata cache for an Entity.
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- conn
-
- System.Management.Automation.ParameterAttribute
- System.Management.Automation.ArgumentTypeConverterAttribute
-
-
- A connection to your CRM organization. Use $conn = Get-CrmConnection <Parameters> to generate it.
-
-
-
-
- EntityLogicalName
-
- System.Management.Automation.ParameterAttribute
- System.Management.Automation.ArgumentTypeConverterAttribute
-
-
- A logicalname for Entity. i.e.)account, contact, lead, etc..
-
-
-
-
-
-
- Example 1
- Remove-CrmEntityMetadataCache -conn $conn -EntityLogicalName account
-
- This example removes metadata cache for Account Entity.
-
-
-
-
- Example 2
- Remove-CrmEntityMetadataCache lead
-
- This example removes metadata cache for Lead Entity by omitting parameter names.
-When omitting parameter names, you do not provide $conn, cmdlets automatically finds it.
-
-
-
-
-
- false
-
-
- Remove-CrmRecord
-
- Remove-CrmRecord [-conn <CrmServiceClient>] [-CrmRecord] <PSObject>
- Remove-CrmRecord [-conn <CrmServiceClient>] [-EntityLogicalName] <String> [-Id] <Guid>
-
-
- Delete a CRM record by specifying EntityLogicalName and record's Id (guid)
- The Remove-CrmRecord cmdlet lets you delete a record of your CRM organization.
-
-There are two ways to delete a record.
-1. Pass EntityLogicalName and record's Id.
-2. Get a record object by using Get-CrmRecord/Get-CrmRecords cmdlets, then pass it.
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- conn
-
- System.Management.Automation.ParameterAttribute
- System.Management.Automation.ArgumentTypeConverterAttribute
-
-
- A connection to your CRM organization. Use $conn = Get-CrmConnection <Parameters> to generate it.
-
-
-
- CrmRecord
-
- System.Management.Automation.ParameterAttribute
- System.Management.Automation.ArgumentTypeConverterAttribute
-
-
- A record object which is obtained via Get-CrmRecord/Get-CrmRecords. When you pass CrmRecord, then you don't use EntityLogicalName/Id.
-
-
-
- EntityLogicalName
-
- System.Management.Automation.ParameterAttribute
- System.Management.Automation.ArgumentTypeConverterAttribute
-
-
- A logicalname for an Entity to delete. i.e.)accout, contact, lead, etc..
-
-
-
- Id
-
- System.Management.Automation.ParameterAttribute
- System.Management.Automation.ArgumentTypeConverterAttribute
-
-
- An Id (guid) of the record
-
-
-
-
-
- Example 1
- Remove-CrmRecord -conn $conn -EntityLogicalName account -Id 52a17637-5617-e511-80dc-c4346bc4fc6c
- This example deletes an account record by using Id
-
-
-
- Example 2
- PS C:\>$account = Get-CrmRecord account b202caab-6c16-e511-80d6-c4346bc43dc0 name
-
-PS C:\>$account
-accountid_Property : [accountid, b202caab-6c16-e511-80d6-c4346bc43dc0]
-accountid : b202caab-6c16-e511-80d6-c4346bc43dc0
-original : {[name_Property, [name, Adventure Works (sample)]], [name, Adventure Works (sample)], [accountid_Property, [accountid,
- b202caab-6c16-e511-80d6-c4346bc43dc0]], [accountid, b202caab-6c16-e511-80d6-c4346bc43dc0]}
-logicalname : account
-
-PS C:\>Remove-CrmRecord $account
-
-PS C:\>Get-CrmRecord account b202caab-6c16-e511-80d6-c4346bc43dc0 name
-WARNING: Record Id: b202caab-6c16-e511-80d6-c4346bc43dc0Does Not Exist
- This example retrieves and store an account record to $account object, then pass it to Remove-CrmRecord cmdlet.
-Finally retrieves it again to confirm it is deleted.
-When ommiting parameter names, you do not provide $conn, cmdlets automatically finds it.
-
-
-
- Example 3
-
- This example retrieves and stores account records by using FetchXML and pipe results (CrmRecords). In the next pipe, it updates each record using Remove-CrmRecord.
-Finally retrieves them again to confirm all records are deleted.
-
-
-
-
-
- false
-
-
- Remove-CrmRecordAssociation
-
- Remove-CrmRecordAssociation [-conn <CrmServiceClient>] [-CrmRecord1] <PSObject> [-CrmRecord2] <PSObject> [-RelationshipName] <String>
- Remove-CrmRecordAssociation [-conn <CrmServiceClient>] [-EntityLogicalName1] <String> [-Id1] <Guid> [-EntityLogicalName2] <String> [-Id2] <Guid> [-RelationshipName] <String>
-
-
- Associates two records for N:N relationship.
- The Remove-CrmRecordAssociation cmdlet lets you disassociate two records for N:N relationship by specifying relationship logical name.
-
-There are two ways to specify records.
-
-1. Pass EntityLogicalName and record's Id for both records.
-2. Get a record object by using Get-CrmRecord/Get-CrmRecords cmdlets, and pass it for both records.
-
-You can specify relationship logical name for the disassociation.
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- conn
-
- System.Management.Automation.ParameterAttribute
- System.Management.Automation.ArgumentTypeConverterAttribute
-
-
- A connection to your CRM organization. Use $conn = Get-CrmConnection <Parameters> to generate it.
-
-
-
- CrmRecord1
-
- System.Management.Automation.ParameterAttribute
- System.Management.Automation.ArgumentTypeConverterAttribute
-
-
- A first record object which is obtained via Get-CrmRecord/Get-CrmRecords. When you pass CrmRecord, then you don't use EntityLogicalName/Id.
-
-
-
- CrmRecord2
-
- System.Management.Automation.ParameterAttribute
- System.Management.Automation.ArgumentTypeConverterAttribute
-
-
- A second record object which is obtained via Get-CrmRecord/Get-CrmRecords. When you pass CrmRecord, then you don't use EntityLogicalName/Id.
-
-
-
- RelationshipName
-
- System.Management.Automation.ParameterAttribute
- System.Management.Automation.ArgumentTypeConverterAttribute
-
-
- A N:N relationship logical name.
-
-
-
- EntityLogicalName1
-
- System.Management.Automation.ParameterAttribute
- System.Management.Automation.ArgumentTypeConverterAttribute
-
-
- A logicalname for first Entity. i.e.)account, contact, lead, etc..
-
-
-
- Id1
-
- System.Management.Automation.ParameterAttribute
- System.Management.Automation.ArgumentTypeConverterAttribute
-
-
- An Id (guid) of first record
-
-
-
- EntityLogicalName2
-
- System.Management.Automation.ParameterAttribute
- System.Management.Automation.ArgumentTypeConverterAttribute
-
-
- A logicalname for second Entity. i.e.)account, contact, lead, etc..
-
-
-
- Id2
-
- System.Management.Automation.ParameterAttribute
- System.Management.Automation.ArgumentTypeConverterAttribute
-
-
- An Id (guid) of second record
-
-
-
-
-
- Example 1
- Remove-CrmRecordAssociation -conn $conn -EntityLogicalName1 account -Id1 00005a70-6317-e511-80da-c4346bc43d94 -EntityLogicalName2 contact -Id2 66005a70-6317-e511-80da-c4346bc43d94 -RelationshipName new_accounts_contacts
- This example associates an account and a contact records through new_accounts_contacts custom N:N relationship.
-
-
-
- Example 2
- Remove-CrmRecordAssociation account 00005a70-6317-e511-80da-c4346bc43d94 contact 66005a70-6317-e511-80da-c4346bc43d94 new_accounts_contacts
- This example associates an account and a contact records through new_accounts_contacts custom N:N relationship by omitting parameters names.
-
-When omitting parameter names, you do not provide $conn, cmdlets automatically finds it.
-
-
-
- Example 3
- PS C:\>$account = Get-CrmRecord account 00005a70-6317-e511-80da-c4346bc43d94 name
-
-PS C:\>$contact = Get-CrmRecord contact 66005a70-6317-e511-80da-c4346bc43d94 fullname
-
-PS C:\>Remove-CrmRecordAssociation -conn $conn -CrmRecord1 $account -CrmRecord2 $contact -RelationshipName new_accounts_contacts
- This example retrieves and stores an account and a contact records to variables, then pass them to Remove-CrmRecordAssociation cmdlets.
-
-
-
- Example 4
- PS C:\>$account = Get-CrmRecord account 00005a70-6317-e511-80da-c4346bc43d94 name
-
-PS C:\>$contact = Get-CrmRecord contact 66005a70-6317-e511-80da-c4346bc43d94 fullname
-
-PS C:\>Remove-CrmRecordAssociation $account $contact new_accounts_contacts
- This example retrieves and stores an account and a contact records to variables, then pass them to Remove-CrmRecordAssociation cmdlets.
-
-
-
-
-
- false
-
-
- Remove-CrmSampleData
-
- Remove-CrmSampleData [[-conn] <CrmServiceClient>]
-
-
- Removes sample data CRM Organization.
-
- The Remove-CrmSampleData cmdlet lets you remove sample data to CRM Organization and returns Job Id. You can confirm the status by using Test-CrmSampleDataInstalled cmdlet.
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- conn
-
- System.Management.Automation.ParameterAttribute
- System.Management.Automation.ArgumentTypeConverterAttribute
-
-
- A connection to your CRM organization. Use $conn = Get-CrmConnection <Parameters> to generate it.
-
-
-
-
-
-
- Example 1
- Remove-CrmSampleData -conn $conn
- This example removes sample data.
-
-
-
-
- Example 2
- Add-CrmSampleData
-
- This example removes sample data by omitting parameter names.
-When omitting parameter names, you do not provide $conn, cmdlets automatically finds it.
-
-
-
-
-
- false
-
-
- Remove-CrmSecurityRoleFromTeam
-
- Remove-CrmSecurityRoleFromTeam [-conn <CrmServiceClient>] [-TeamRecord] <PSObject> [-SecurityRoleRecord] <PSObject>
- Remove-CrmSecurityRoleFromTeam [-conn <CrmServiceClient>] [-TeamId] <String> [-SecurityRoleId] <String>
-
-
- Removes a security role from a team.
-
- The Set-CrmSecurityRoleToUser cmdlet lets you remove a security role from a team.
-
-There are two ways to specify records.
-1. Pass record's Id for both records.
-2. Get a record object by using Get-CrmRecord/Get-CrmRecords cmdlets, and pass it for both records.
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- conn
-
- System.Management.Automation.ParameterAttribute
- System.Management.Automation.ArgumentTypeConverterAttribute
-
-
- A connection to your CRM organization. Use $conn = Get-CrmConnection <Parameters> to generate it.
-
-
-
-
- TeamRecord
-
- System.Management.Automation.ParameterAttribute
- System.Management.Automation.ArgumentTypeConverterAttribute
-
-
- A team record object which is obtained via Get-CrmRecord/Get-CrmRecords. When you pass CrmRecord, then you don't use UserId.
-
-
-
-
- SecurityRoleRecord
-
- System.Management.Automation.ParameterAttribute
- System.Management.Automation.ArgumentTypeConverterAttribute
-
-
- A security role record object which is obtained via Get-CrmRecord/Get-CrmRecords. When you pass CrmRecord, then you don't use SecurityRoleId.
-
-
-
-
- TeamId
-
- System.Management.Automation.ParameterAttribute
- System.Management.Automation.ArgumentTypeConverterAttribute
-
-
- An Id (guid) of team record
-
-
-
-
- SecurityRoleId
-
- System.Management.Automation.ParameterAttribute
- System.Management.Automation.ArgumentTypeConverterAttribute
-
-
- An Id (guid) of security role record
-
-
-
-
-
-
- Example 1
- Remove-CrmSecurityRoleFromTeam -conn $conn -TeamId 00005a70-6317-e511-80da-c4346bc43d94 -SecurityRoleId 66005a70-6317-e511-80da-c4346bc43d94
-
- This example removes a security role to a team by using Id.
-
-
-
-
- Example 2
- Remove-CrmSecurityRoleFromTeam 00005a70-6317-e511-80da-c4346bc43d94 66005a70-6317-e511-80da-c4346bc43d94
-
- This example removes a security role to a team by using Id by omitting parameters names.
-When omitting parameter names, you do not provide $conn, cmdlets automatically finds it.
-
-
-
- Example 3
- PS C:\>$team = Get-CrmRecord team 00005a70-6317-e511-80da-c4346bc43d94 name
-
-PS C:\>$role = Get-CrmRecord role 66005a70-6317-e511-80da-c4346bc43d94 name
-
-PS C:\>Remove-CrmSecurityRoleFromTeam $team $role
- This example removes a security role to a team by using record objects.
-
-
-
-
-
-
- false
-
-
- Remove-CrmSecurityRoleFromUser
-
- Remove-CrmSecurityRoleFromUser [-conn <CrmServiceClient>] [-UserRecord] <PSObject> [-SecurityRoleName] <String>
- Remove-CrmSecurityRoleFromUser [-conn <CrmServiceClient>] [-UserRecord] <PSObject> [-SecurityRoleRecord] <PSObject>
- Remove-CrmSecurityRoleFromUser [-conn <CrmServiceClient>] [-UserId] <String> [-SecurityRoleName] <String>
- Remove-CrmSecurityRoleFromUser [-conn <CrmServiceClient>] [-UserId] <String> [-SecurityRoleId] <String>
-
-
- Removes a security role to a user.
-
- The Remove-CrmSecurityRoleFromUser cmdlet lets you remove a security role to a user.
-
-There are two ways to specify records.
-1. Pass record's Id for both records.
-2. Get a record object by using Get-CrmRecord/Get-CrmRecords cmdlets, and pass it for both records.
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- conn
-
- System.Management.Automation.ParameterAttribute
- System.Management.Automation.ArgumentTypeConverterAttribute
-
-
- A connection to your CRM organization. Use $conn = Get-CrmConnection <Parameters> to generate it.
-
-
-
-
- UserRecord
-
- System.Management.Automation.ParameterAttribute
- System.Management.Automation.ParameterAttribute
- System.Management.Automation.ArgumentTypeConverterAttribute
-
-
- A user record object which is obtained via Get-CrmRecord/Get-CrmRecords. When you pass CrmRecord, then you don't use UserId.
-
-
-
-
- SecurityRoleRecord
-
- System.Management.Automation.ParameterAttribute
- System.Management.Automation.ArgumentTypeConverterAttribute
-
-
- A security role record object which is obtained via Get-CrmRecord/Get-CrmRecords. When you pass CrmRecord, then you don't use SecurityRoleId.
-
-
-
-
- UserId
-
- System.Management.Automation.ParameterAttribute
- System.Management.Automation.ParameterAttribute
- System.Management.Automation.ArgumentTypeConverterAttribute
-
-
- An Id (guid) of user record
-
-
-
-
- SecurityRoleId
-
- System.Management.Automation.ParameterAttribute
- System.Management.Automation.ArgumentTypeConverterAttribute
-
-
- An Id (guid) of security role record
-
-
-
-
- SecurityRoleName
-
- System.Management.Automation.ParameterAttribute
- System.Management.Automation.ParameterAttribute
- System.Management.Automation.ArgumentTypeConverterAttribute
-
-
- Security Role Name, case insensitive but must include spaces. Parameter value should be wrapped in quotes to include spaces.
-
-
-
-
-
- Example 1
- Remove-CrmSecurityRoleFromUser -conn $conn -UserId 00005a70-6317-e511-80da-c4346bc43d94 -SecurityRoleId 66005a70-6317-e511-80da-c4346bc43d94
-
- This example removes a security role to a user by using Id.
-
-
-
-
- Example 2
- Remove-CrmSecurityRoleFromUser 00005a70-6317-e511-80da-c4346bc43d94 66005a70-6317-e511-80da-c4346bc43d94
-
- This example removes a security role to a user by using Id by omitting parameters names.
-When omitting parameter names, you do not provide $conn, cmdlets automatically finds it.
-
-
-
-
- Example 3
- PS C:\>$user = Get-CrmRecord sysetmuser 00005a70-6317-e511-80da-c4346bc43d94 fullname
-
-PS C:\>$role = Get-CrmRecord role 66005a70-6317-e511-80da-c4346bc43d94 name
-
-PS C:\>Remove-CrmSecurityRoleFromUser $user $role
-
- This example removes a security role to a user by using record objects.
-
-
-
-
-
-
- false
-
-
- Remove-CrmUserManager
-
- Remove-CrmUserManager [-conn <CrmServiceClient>] [-UserId] <Guid>
-
-
- Removes CRM user's manager.
-
- The Remove-CrmUserManager lets you remove CRM user's manager.
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- conn
-
- System.Management.Automation.ParameterAttribute
- System.Management.Automation.ArgumentTypeConverterAttribute
-
-
- A connection to your CRM organization. Use $conn = Get-CrmConnection <Parameters> to generate it.
-
-
-
-
- UserId
-
- System.Management.Automation.ParameterAttribute
- System.Management.Automation.ArgumentTypeConverterAttribute
-
-
- An Id (guid) of CRM User.
-
-
-
-
-
-
- Example 1
- Remove-CrmUserManager -conn $conn -UserId 3772fe6e-8a18-e511-80dc-c4346bc42d48
-
- This example removes a manager from a CRM user.
-
-
-
-
- Example 2
- Remove-CrmUserManager 3772fe6e-8a18-e511-80dc-c4346bc42d48
-
-
-
-
-
-
-
- false
-
-
- Set-CrmActivityRecordToCloseState
-
- Set-CrmActivityRecordToCloseState [-conn <CrmServiceClient>] [-CrmRecord] <PSObject> [-StateCode] <String> [-StatusCode] <String>
- Set-CrmActivityRecordToCloseState [-conn <CrmServiceClient>] [-ActivityEntityType] <String> [-ActivityId] <Guid> [-StateCode] <String> [-StatusCode] <String>
-
-
- Close an activity record.
- The Set-CrmActivityRecordToCloseState cmdlet lets you close an activity record.
-
-There are two ways to specify a record.
-1. Pass ActivityEntityType and record's Id.
-2. Get a record object by using Get-CrmRecord/Get-CrmRecords cmdlets, then pass it.
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- conn
-
- System.Management.Automation.ParameterAttribute
- System.Management.Automation.ArgumentTypeConverterAttribute
-
-
- A connection to your CRM organization. Use $conn = Get-CrmConnection <Parameters> to generate it.
-
-
-
- CrmRecord
-
- System.Management.Automation.ParameterAttribute
- System.Management.Automation.ArgumentTypeConverterAttribute
-
-
- A record object which is obtained via Get-CrmRecord/Get-CrmRecords. When you pass CrmRecord, then you don't use ActivityEntityType/ActivityId
-
-
-
- StateCode
-
- System.Management.Automation.ParameterAttribute
- System.Management.Automation.ArgumentTypeConverterAttribute
-
-
- A State code name. You can use (Get-CrmEntityOptionSet <EntityLogicalName> statecode).Items to get StateCode strings.
-
-
-
- StatusCode
-
- System.Management.Automation.ParameterAttribute
- System.Management.Automation.ArgumentTypeConverterAttribute
-
-
- A Status code name. You can use (Get-CrmEntityOptionSet <EntityLogicalName> statuscode).Items to get StateCode strings.
-
-
-
- ActivityEntityType
-
- System.Management.Automation.ParameterAttribute
- System.Management.Automation.ArgumentTypeConverterAttribute
-
-
- A logicalname for an Activity Entity to close. i.e.)phonecall, email, task, etc..
-
-
-
- ActivityId
-
- System.Management.Automation.ParameterAttribute
- System.Management.Automation.ArgumentTypeConverterAttribute
-
-
- An Id (guid) of the activity record
-
-
-
-
-
- Example 1
- Set-CrmActivityRecordToCloseState -conn $conn -ActivityEntityType task -ActivityId a0025a70-6317-e511-80da-c4346bc43d94 -StateCode Completed -StatusCode Completed
- This example closes a task record as Completed/Completed.
-
-
-
- Example 2
- Set-CrmActivityRecordToCloseState task a0025a70-6317-e511-80da-c4346bc43d94 Open "In Progress"
- This example closes a task record as InProgress/Open.
-When ommiting parameter names, you do not provide $conn, cmdlets automatically finds it.
-
-
-
- Example 3
- PS C:\>$task = Get-CrmRecord task a0025a70-6317-e511-80da-c4346bc43d94 subject
-
-PS C:\>Set-CrmActivityRecordToCloseState $task Open "Not Started"
- This example retrieves and store a task record, then pass it to Set-CrmActivityRecordToCloseState
-
-
-
-
-
- false
-
-
- Set-CrmConnectionCallerId
-
- Set-CrmConnectionCallerId [-conn <CrmServiceClient>] [-CallerId] <Guid>
-
-
- Sets CRM Connection CallerId to impersonate.
-
- The Set-CrmConnectionCallerId lets you set CRM Connection CallerId to impersonate.
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- conn
-
- System.Management.Automation.ParameterAttribute
- System.Management.Automation.ArgumentTypeConverterAttribute
-
-
- A connection to your CRM organization. Use $conn = Get-CrmConnection <Parameters> to generate it.
-
-
-
-
- CallerId
-
- System.Management.Automation.AliasAttribute
- System.Management.Automation.ParameterAttribute
- System.Management.Automation.ArgumentTypeConverterAttribute
-
-
- UserId
-
- A guid of the User to impersonate.
-
-
-
-
-
-
- Example 1
- Set-CrmConnectionCallerId -conn $conn -CallerId 2eded89d-be89-e511-80f0-c4346bc4ef0c
-
- This example sets CRM Connection CallerId to 2eded89d-be89-e511-80f0-c4346bc4ef0c. NOTE THIS WILL CONTINUE TO IMPERSONATE THE USER UNTIL YOU SET IT BACK TO YOUR OWN USERID.
-
-
-
-
-
- false
-
-
- Set-CrmConnectionTimeout
-
- Set-CrmConnectionTimeout [-conn <CrmServiceClient>] [[-TimeoutInSeconds] <Int64>] [[-SetDefault] <SwitchParameter>]
-
-
- Sets CRM Connection timeout value in seconds.
-
- The Set-CrmConnectionTimeout lets you set CRM Connection timeout value in seconds.
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- conn
-
- System.Management.Automation.ParameterAttribute
- System.Management.Automation.ArgumentTypeConverterAttribute
-
-
- A connection to your CRM organization. Use $conn = Get-CrmConnection <Parameters> to generate it.
-
-
-
-
- TimeoutInSeconds
-
- System.Management.Automation.ParameterAttribute
- System.Management.Automation.ArgumentTypeConverterAttribute
-
-
- Timeout value for CRM connection.
-
-
-
-
- SetDefault
-
- System.Management.Automation.ParameterAttribute
- System.Management.Automation.ArgumentTypeConverterAttribute
-
-
- Specyfing SetDefault will set default value to the connection. (120 seconds)
-
-
-
-
-
-
- Example 1
- Set-CrmConnectionTimeout -conn $conn -TimeoutInSeconds 1000
-
- This example sets CRM Connection timeout to 1000 seconds.
-
-
-
-
- Example 2
- Set-CrmConnectionTimeout -conn $conn -SetDefault
-
- This example sets CRM Connection timeout to default. (120 seconds)
-
-
-
-
-
-
- false
-
-
- Set-CrmRecord
-
- Set-CrmRecord [-conn <CrmServiceClient>] [-CrmRecord] <PSObject> [-Upsert] [-PrimaryKeyField <String>]
- Set-CrmRecord [-conn <CrmServiceClient>] [-EntityLogicalName] <String> [-Id] <Guid> [-Fields] <Hashtable> [-Upsert] [-PrimaryKeyField <String>]
-
-
- Updates a new CRM record by specifying EntityLogicalName, record's Id (guid) and field name/value sets.
- The Set-CrmRecord cmdlet lets you update a record of your CRM organization.
-
-There are two ways to update a record.
-1. Pass EntityLogicalName and record's Id and field name/value set. Use @{"field logical name"="value"} syntax to update Fields, and make sure you specify correct type of value for the field.
-You can use Get-CrmEntityAttributeMetadata cmdlet and check AttributeType to see the field type. In addition, for CRM specific types, you can use New-CrmMoney, New-CrmOptionSetValue or New-CrmEntityReference cmdlets.
-
-2. Get a record object by using Get-CrmRecord/Get-CrmRecords cmdlets, then assign new value for fields. if a field you want to assign value is not available, you need to use first method to update the field.
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- conn
-
- System.Management.Automation.ParameterAttribute
- System.Management.Automation.ArgumentTypeConverterAttribute
-
-
- A connection to your CRM organizatoin. Use $conn = Get-CrmConnection <Parameters> to generate it.
-
-
-
- CrmRecord
-
- System.Management.Automation.ParameterAttribute
- System.Management.Automation.ArgumentTypeConverterAttribute
-
-
- A record object which is obtained via Get-CrmRecord/Get-CrmRecords. When you pass CrmRecord, then you don't use EntityLogicalName/Id.
-
-
-
- EntityLogicalName
-
- System.Management.Automation.ParameterAttribute
- System.Management.Automation.ArgumentTypeConverterAttribute
-
-
- A logicalname for an Entity to update. i.e.)accout, contact, lead, etc..
-
-
-
- Id
-
- System.Management.Automation.ParameterAttribute
- System.Management.Automation.ArgumentTypeConverterAttribute
-
-
- An Id (guid) of the record
-
-
-
- Fields
-
- System.Management.Automation.ParameterAttribute
- System.Management.Automation.ArgumentTypeConverterAttribute
-
-
- A List of field name/value pair. Use @{"field logical name"="value"} syntax to create Fields, and make sure you specify correct type of value for the field.
-You can use Get-CrmEntityAttributeMetadata cmdlet and check AttributeType to see the field type. In addition, for CRM specific types, you can use New-CrmMoney, New-CrmOptionSetValue or New-CrmEntityReference cmdlets.
-
-
-
- Upsert
-
- System.Management.Automation.ParameterAttribute
- System.Management.Automation.ArgumentTypeConverterAttribute
-
-
- Spcify Upsert when you want to create a record if it does not exist in the system yet. It tries to retrieve a record by using Id first, and if exists, update otherwise create.
-
-
-
- PrimaryKeyField
-
- System.Management.Automation.AllowEmptyStringAttribute
- System.Management.Automation.AllowNullAttribute
- System.Management.Automation.ParameterAttribute
- System.Management.Automation.ArgumentTypeConverterAttribute
-
-
-
-
-
-
-
-
- Example 1
- Set-CrmRecord -conn $conn -EntityLogicalName account -Id 52a17637-5617-e511-80dc-c4346bc4fc6c -Fields @{"name"="updated name";"telephone1"="555-5555"}
- This example updates an account record by using Id and new value for name/telephone1 fields.
-Though any of field value is same as current record, it still tries to update the field.
-
-
-
- Example 2
- PS C:\>$fetch = @"
-<fetch version="1.0" output-format="xml-platform" mapping="logical" distinct="false" no-lock="true">
-<entity name="account">
- <attribute name="name" />
- </entity>
-</fetch>
-"@
-
-PS C:\>(Get-CrmRecordsByFetch $fetch).CrmRecords | % { $_.name = $_.name + " updated!"; Set-CrmRecord -CrmRecord $_}
-
- This example retrieves and stores account records by using FetchXML and pipe results (CrmRecords). In the next pipe, it does foreach operation (%) and assign new value for name. Then it updates each record using Set-CrmRecord.
-
-
-
- Example 3
- Set-CrmRecord account 52a17637-5617-e511-80dc-c4346bc4fc6c @{"industrycode"=New-CrmOptionSetValue -Value 1}
- This example updates an account record by using Id and IndustryCode filed by specifying OptionSetValue.
-When ommiting parameter names, you do not provide $conn, cmdlets automatically finds it.
-
-
-
- Example 4
- PS C:\>$account = Get-CrmRecord account b202caab-6c16-e511-80d6-c4346bc43dc0 name
-PS C:\>$account
-PS C:\>$account.name = $account.name + " updated!"
-PS C:\>Set-CrmRecord $account
-PS C:\>Get-CrmRecord account b202caab-6c16-e511-80d6-c4346bc43dc0 name
-
- This example retrieves and store an account record to $account object, then assign new value for name field. Then update it by using Set-CrmRecord cmdlet.
-Finally retrieves it again to display the result.
-When omitting parameter names, you do not provide $conn, cmdlets automatically finds it.
-
-
-
-
-
- false
-
-
- Set-CrmRecordOwner
-
- Set-CrmRecordOwner [-conn <CrmServiceClient>] [-CrmRecord] <PSObject> [-PrincipalId] <Guid> [[-AssignToTeam] <SwitchParameter>]
- Set-CrmRecordOwner [-conn <CrmServiceClient>] [-EntityLogicalName] <String> [-Id] <Guid> [-PrincipalId] <Guid> [[-AssignToTeam] <SwitchParameter>]
-
-
- Assign an user as a CRM record's owner
- The Set-CrmRecordOwner cmdlet lets you assign a user to a record's owner.
-
-There are two ways to specify a record.
-1. Pass EntityLogicalName and record's Id.
-2. Get a record object by using Get-CrmRecord/Get-CrmRecords cmdlets, then pass it.
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- conn
-
- System.Management.Automation.ParameterAttribute
- System.Management.Automation.ArgumentTypeConverterAttribute
-
-
- A connection to your CRM organization. Use $conn = Get-CrmConnection <Parameters> to generate it.
-
-
-
- CrmRecord
-
- System.Management.Automation.ParameterAttribute
- System.Management.Automation.ArgumentTypeConverterAttribute
-
-
- A record object which is obtained via Get-CrmRecord/Get-CrmRecords. When you pass CrmRecord, then you don't use EntityLogicalName/Id.
-
-
-
- PrincipalId
-
- System.Management.Automation.AliasAttribute
- System.Management.Automation.ParameterAttribute
- System.Management.Automation.ArgumentTypeConverterAttribute
-
-
- UserId
-
- An Id (guid) of SystemUser or team to be assigned as owner.
-
-
-
- AssignToTeam
-
- System.Management.Automation.ParameterAttribute
- System.Management.Automation.ArgumentTypeConverterAttribute
-
-
- Switch indicating the PrincipalId Supplied is for a CRM Ownership Team and NOT a CRM User
-
-
-
- EntityLogicalName
-
- System.Management.Automation.ParameterAttribute
- System.Management.Automation.ArgumentTypeConverterAttribute
-
-
- A logicalname for an Entity to set an owner. i.e.)accout, contact, lead, etc..
-
-
-
- Id
-
- System.Management.Automation.ParameterAttribute
- System.Management.Automation.ArgumentTypeConverterAttribute
-
-
- An Id (guid) of the record
-
-
-
-
-
- Example 1
- Set-CrmRecordOwner -conn $conn -EntityLogicalName contact -Id e1d47674-4017-e511-80db-c4346bc42d18 -PrincipalId f9d40920-7a43-4f51-9749-0549c4caf67d
- This example assigns a contact record to an User.
-
-
-
- Example 2
- Set-CrmRecordOwner -conn $conn -EntityLogicalName contact -Id e1d47674-4017-e511-80db-c4346bc42d18 -PrincipalId f0d40920-7a43-4f51-9749-0549c4caf673 -AssignToTeam
- This example assigns a contact record to a Team.
-
-
-
- Example 3
- Set-CrmRecordOwner contact e1d47674-4017-e511-80db-c4346bc42d18 f9d40920-7a43-4f51-9749-0549c4caf67d
- This example assigns a contact record to an User by ommiting parameter names.
-When omitting parameter names, you do not provide $conn, cmdlets automatically finds it.
-
-
-
- Example 4
- PS C:\>$contact = Get-CrmRecord contact e1d47674-4017-e511-80db-c4346bc42d18 fullname
-PS C:\>Set-CrmRecordOwner $contact f9d40920-7a43-4f51-9749-0549c4caf67d
- This example retrieves and store a contact record, then pass it to Set-CrmRecordOwner.
-
-
-
-
-
- false
-
-
- Set-CrmRecordState
-
- Set-CrmRecordState [-conn <CrmServiceClient>] [-CrmRecord] <PSObject> [-StateCode] <String> [-StatusCode] <String>
- Set-CrmRecordState [-conn <CrmServiceClient>] [-EntityLogicalName] <String> [-Id] <Guid> [-StateCode] <String> [-StatusCode] <String>
-
-
- Sets Status/State for a CRM record.
-
- The Set-CrmRecordState cmdlet lets you set Status/State for a CRM record.
-
-There are two ways to specify a record.
-1. Pass EntityLogicalName and record's Id.
-2. Get a record object by using Get-CrmRecord/Get-CrmRecords cmdlets, then pass it.
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- conn
-
- System.Management.Automation.ParameterAttribute
- System.Management.Automation.ArgumentTypeConverterAttribute
-
-
- A connection to your CRM organization. Use $conn = Get-CrmConnection <Parameters> to generate it.
-
-
-
-
- CrmRecord
-
- System.Management.Automation.ParameterAttribute
- System.Management.Automation.ArgumentTypeConverterAttribute
-
-
- A record object which is obtained via Get-CrmRecord/Get-CrmRecords. When you pass CrmRecord, then you don't use EntityLogicalName/Id.
-
-
-
-
- StateCode
-
- System.Management.Automation.ParameterAttribute
- System.Management.Automation.ArgumentTypeConverterAttribute
-
-
- StateCode value for a record. You can retrieve values by using Get-CrmEntityOptionSet <EntityLogicalName> statecode | % {$_.Items}
-
-
-
-
- StatusCode
-
- System.Management.Automation.ParameterAttribute
- System.Management.Automation.ArgumentTypeConverterAttribute
-
-
- StatusCode value for a record. You can retrieve values by using Get-CrmEntityOptionSet <EntityLogicalName> statuscode | % {$_.Items}
-
-
-
-
- EntityLogicalName
-
- System.Management.Automation.ParameterAttribute
- System.Management.Automation.ArgumentTypeConverterAttribute
-
-
- A logicalname for an Entity to set an owner. i.e.)account, contact, lead, etc..
-
-
-
-
- Id
-
- System.Management.Automation.ParameterAttribute
- System.Management.Automation.ArgumentTypeConverterAttribute
-
-
- An Id (guid) of the record
-
-
-
-
-
-
- Example 1
- Set-CrmRecordState -conn $conn -EntityLogicalName account -Id 1bf8d93d-1f18-e511-80da-c4346bc43d94 -StateCode Inactive -StatusCode Inactive
-
- This example sets disabled state for an account record.
-
-
-
-
- Example 2
- Set-CrmRecordState account 1bf8d93d-1f18-e511-80da-c4346bc43d94 Inactive Inactive
-
- This example sets disabled state for an account record by omitting parameter names.
-When omitting parameter names, you do not provide $conn, cmdlets automatically finds it.
-
-
-
- Example 3
- PS C:\>$contact = Get-CrmRecord contact 81f8d93d-1f18-e511-80da-c4346bc43d94 fullname
-
-PS C:\>Set-CrmRecordState $contact Inactive Inactive
- This example retrieves and store a contact record, then pass it to Set-CrmRecordState to disable it.
-
-
-
-
-
-
- false
-
-
- Set-CrmSystemSettings
-
- Set-CrmSystemSettings [[-conn] <CrmServiceClient>] [[-AcknowledgementTemplateId] <Guid>] [[-ACTDeliveryMethod] <Int32>] [[-AllowAddressBookSyncs] <Boolean>] [[-AllowAutoResponseCreation] <Boolean>] [[-AllowAutoUnsubscribe] <Boolean>] [[-AllowAutoUnsubscribeAcknowledgement] <Boolean>] [[-AllowClientMessageBarAd] <Boolean>] [[-AllowEntityOnlyAudit] <Boolean>] [[-AllowMarketingEmailExecution] <Boolean>] [[-AllowOfflineScheduledSyncs] <Boolean>] [[-AllowOutlookScheduledSyncs] <Boolean>] [[-AllowUnresolvedPartiesOnEmailSend] <Boolean>] [[-AllowUserFormModePreference] <Boolean>] [[-AllowUsersSeeAppdownloadMessage] <Boolean>] [[-AllowWebExcelExport] <Boolean>] [[-AMDesignator] <String>] [[-AutoApplyDefaultonCaseCreate] <Boolean>] [[-AutoApplyDefaultonCaseUpdate] <Boolean>] [[-AutoApplySLA] <Boolean>] [[-BingMapsApiKey] <String>] [[-BlockedAttachments] <String>] [[-BusinessClosureCalendarId] <Guid>] [[-CampaignPrefix] <String>] [[-CascadeStatusUpdate] <Boolean>] [[-CasePrefix] <String>] [[-ContractPrefix] <String>] [[-CortanaProactiveExperienceEnabled] <Boolean>] [[-CreateProductsWithoutParentInActiveState] <Boolean>] [[-CurrencyDecimalPrecision] <Int32>] [[-CurrencyDisplayOption] <Int32>] [[-CurrentCampaignNumber] <Int32>] [[-CurrentCaseNumber] <Int32>] [[-CurrentContractNumber] <Int32>] [[-CurrentInvoiceNumber] <Int32>] [[-CurrentKbNumber] <Int32>] [[-CurrentOrderNumber] <Int32>] [[-CurrentQuoteNumber] <Int32>] [[-DefaultCountryCode] <String>] [[-DefaultEmailServerProfileId] <Guid>] [[-DisableSocialCare] <Boolean>] [[-DisplayNavigationTour] <Boolean>] [[-EmailConnectionChannel] <Int32>] [[-EmailCorrelationEnabled] <Int32>] [[-EnableBingMapsIntegration] <Boolean>] [[-EnableSmartMatching] <Boolean>] [[-FullNameConventionCode] <Int32>] [[-GenerateAlertsForErrors] <Boolean>] [[-GenerateAlertsForWarnings] <Boolean>] [[-GenerateAlertsForInformation] <Boolean>] [[-GlobalAppendUrlParametersEnabled] <Boolean>] [[-GlobalHelpUrl] <String>] [[-GlobalHelpUrlEnabled] <Boolean>] [[-HashDeltaSubjectCount] <Int32>] [[-HashFilterKeywords] <String>] [[-HashMaxCount] <Int32>] [[-HashMinAddressCount] <Int32>] [[-IgnoreInternalEmail] <Boolean>] [[-IncomingEmailDeliveryMethod] <Int32>] [[-InvoicePrefix] <String>] [[-IsAutoSaveEnabled] <Boolean>] [[-IsDefaultCountryCodeCheckEnabled] <Boolean>] [[-IsDuplicateDetectionEnabled] <Boolean>] [[-IsDuplicateDetectionEnabledForImport] <Boolean>] [[-IsDuplicateDetectionEnabledForOfflineSync] <Boolean>] [[-IsDuplicateDetectionEnabledForOnlineCreateUpdate] <Boolean>] [[-isenabledforallroles] <Boolean>] [[-IsFolderBasedTrackingEnabled] <Boolean>] [[-IsFullTextSearchEnabled] <Boolean>] [[-IsHierarchicalSecurityModelEnabled] <Boolean>] [[-IsPresenceEnabled] <Boolean>] [[-IsUserAccessAuditEnabled] <Boolean>] [[-KbPrefix] <String>] [[-MaxAppointmentDurationDays] <Int32>] [[-MaxDepthForHierarchicalSecurityModel] <Int32>] [[-MaximumActiveBusinessProcessFlowsAllowedPerEntity] <Int32>] [[-MaximumDynamicPropertiesAllowed] <Int32>] [[-MaximumTrackingNumber] <Int32>] [[-MaxProductsInBundle] <Int32>] [[-MaxRecordsForExportToExcel] <Int32>] [[-MaxRecordsForLookupFilters] <Int32>] [[-MaxUploadFileSize] <Int32>] [[-MinAddressBookSyncInterval] <Int32>] [[-MinOfflineSyncInterval] <Int32>] [[-MinOutlookSyncInterval] <Int32>] [[-NotifyMailboxOwnerOfEmailServerLevelAlerts] <Boolean>] [[-OrderPrefix] <String>] [[-OutgoingEmailDeliveryMethod] <Int32>] [[-PluginTraceLogSetting] <Int32> {0 | 1 | 2} ] [[-PricingDecimalPrecision] <Int32> {0 | 1 | 2 | 3 | 4} ] [[-QuickFindRecordLimitEnabled] <Boolean>] [[-QuotePrefix] <String>] [[-RequireApprovalForUserEmail] <Boolean>] [[-RequireApprovalForQueueEmail] <Boolean>] [[-ShareToPreviousOwnerOnAssign] <Boolean>] [[-TrackingPrefix] <String>] [[-TrackingTokenIdBase] <Int32>] [[-TrackingTokenIdDigits] <Int32>] [[-UniqueSpecifierLength] <Int32>] [[-UseLegacyRendering] <Boolean>] [[-UsePositionHierarchy] <Boolean>] [[-UseSkypeProtocol] <Boolean>] [[-UseAllowUsersSeeAppdownloadMessage] <Boolean>] [[-DefaultCrmCustomName] <String>] [[-SuppressSLA] <Boolean>] [[-IsAuditEnabled] <Boolean>] [[-AllowLegacyClientExperience] <Boolean>]
-
-
- Update CRM Organization's System Settings.
-
- The Set-CrmSystemSettings cmdlet lets you update CRM Organization's System Settings. Use Get-CrmSystemSettings to confirm current settings.
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- conn
-
- System.Management.Automation.ParameterAttribute
- System.Management.Automation.ArgumentTypeConverterAttribute
-
-
- A connection to your CRM organization. Use $conn = Get-CrmConnection <Parameters> to generate it.
-
-
-
-
- ACTDeliveryMethod
-
- System.Management.Automation.ParameterAttribute
- System.Management.Automation.ArgumentTypeConverterAttribute
-
-
- Change "Appointments, Contact, and Tasks" setting for Configure default synchronization method. This parameter accepts int. To get all options, use Get-CrmEntityOptionSet mailbox actdeliverymethod | % Items command and use PickListItemId.
-
-
-
-
- AllowAddressBookSyncs
-
- System.Management.Automation.ParameterAttribute
- System.Management.Automation.ArgumentTypeConverterAttribute
-
-
- Change "Users can schedule background address book synchronization" setting.
-
-
-
-
- AllowAutoResponseCreation
-
- System.Management.Automation.ParameterAttribute
- System.Management.Automation.ArgumentTypeConverterAttribute
-
-
- Indicates whether automatic response creation is allowed.
-
-
-
-
- AllowAutoUnsubscribe
-
- System.Management.Automation.ParameterAttribute
- System.Management.Automation.ArgumentTypeConverterAttribute
-
-
- Indicates whether automatic unsubscribe is allowed.
-
-
-
-
- AllowAutoUnsubscribeAcknowledgement
-
- System.Management.Automation.ParameterAttribute
- System.Management.Automation.ArgumentTypeConverterAttribute
-
-
- Change "Send acknowledgement to customers when they unsubscribe" setting.
-
-
-
-
- AllowClientMessageBarAd
-
- System.Management.Automation.ParameterAttribute
- System.Management.Automation.ArgumentTypeConverterAttribute
-
-
- Change "Users see "Get CRM for Outlook" option displayed in the message bar" setting.
-
-
-
-
- AllowEntityOnlyAudit
-
- System.Management.Automation.ParameterAttribute
- System.Management.Automation.ArgumentTypeConverterAttribute
-
-
- Indicates whether auditing of changes to an entity is allowed when no attributes have changed.
-
-
-
-
- AllowMarketingEmailExecution
-
- System.Management.Automation.ParameterAttribute
- System.Management.Automation.ArgumentTypeConverterAttribute
-
-
- Indicates whether marketing emails execution is allowed
-
-
-
-
- AllowOfflineScheduledSyncs
-
- System.Management.Automation.ParameterAttribute
- System.Management.Automation.ArgumentTypeConverterAttribute
-
-
- Change "Users can schedule background local data synchronization" setting.
-
-
-
-
- AllowOutlookScheduledSyncs
-
- System.Management.Automation.ParameterAttribute
- System.Management.Automation.ArgumentTypeConverterAttribute
-
-
- Change "Users can schedule synchronization" setting.
-
-
-
-
- AllowUnresolvedPartiesOnEmailSend
-
- System.Management.Automation.ParameterAttribute
- System.Management.Automation.ArgumentTypeConverterAttribute
-
-
- Change "Allw messages with unresolved email recipients to be sent" setting.
-
-
-
-
- AllowUsersSeeAppdownloadMessage
-
- System.Management.Automation.ParameterAttribute
- System.Management.Automation.ArgumentTypeConverterAttribute
-
-
- Change "Users see app download message" setting.
-
-
-
-
- AllowWebExcelExport
-
- System.Management.Automation.ParameterAttribute
- System.Management.Automation.ArgumentTypeConverterAttribute
-
-
- Indicates whether web-based export of grids to Microsoft Office Excel is allowed.
-
-
-
-
- BlockedAttachments
-
- System.Management.Automation.ParameterAttribute
- System.Management.Automation.ArgumentTypeConverterAttribute
-
-
- Update "Set blocked file extensions for attachements" list.
-
-
-
-
- CampaignPrefix
-
- System.Management.Automation.ParameterAttribute
- System.Management.Automation.ArgumentTypeConverterAttribute
-
-
- Prefix used for campaign numbering.
-
-
-
-
- CasePrefix
-
- System.Management.Automation.ParameterAttribute
- System.Management.Automation.ArgumentTypeConverterAttribute
-
-
- Prefix to use for all cases throughout Microsoft Dynamics CRM.
-
-
-
-
- ContractPrefix
-
- System.Management.Automation.ParameterAttribute
- System.Management.Automation.ArgumentTypeConverterAttribute
-
-
- Prefix to use for all contracts throughout Microsoft Dynamics CRM.
-
-
-
-
- CurrencyDisplayOption
-
- System.Management.Automation.ParameterAttribute
- System.Management.Automation.ArgumentTypeConverterAttribute
-
-
- Change "Display currencies by using" setting. This parameter accepts int. To get all options, use Get-CrmEntityOptionSet organization currencydisplayoption | % Items command and use PickListItemId.
-
-
-
-
- CurrentCampaignNumber
-
- System.Management.Automation.ParameterAttribute
- System.Management.Automation.ArgumentTypeConverterAttribute
-
-
- Current campaign number.
-
-
-
-
- CurrentCaseNumber
-
- System.Management.Automation.ParameterAttribute
- System.Management.Automation.ArgumentTypeConverterAttribute
-
-
- First case number to use.
-
-
-
-
- CurrentContractNumber
-
- System.Management.Automation.ParameterAttribute
- System.Management.Automation.ArgumentTypeConverterAttribute
-
-
- First contract number to use.
-
-
-
-
- CurrentInvoiceNumber
-
- System.Management.Automation.ParameterAttribute
- System.Management.Automation.ArgumentTypeConverterAttribute
-
-
- First invoice number to use.
-
-
-
-
- CurrentKbNumber
-
- System.Management.Automation.ParameterAttribute
- System.Management.Automation.ArgumentTypeConverterAttribute
-
-
- First article number to use.
-
-
-
-
- CurrentOrderNumber
-
- System.Management.Automation.ParameterAttribute
- System.Management.Automation.ArgumentTypeConverterAttribute
-
-
- First order number to use.
-
-
-
-
- CurrentQuoteNumber
-
- System.Management.Automation.ParameterAttribute
- System.Management.Automation.ArgumentTypeConverterAttribute
-
-
- First quote number to use.
-
-
-
-
- DefaultCountryCode
-
- System.Management.Automation.ValidatePatternAttribute
- System.Management.Automation.ParameterAttribute
- System.Management.Automation.ArgumentTypeConverterAttribute
-
-
- Change "Country/Region Code Prefix" value.
-
-
-
-
- DefaultEmailServerProfileId
-
- System.Management.Automation.ParameterAttribute
- System.Management.Automation.ArgumentTypeConverterAttribute
-
-
- Change "Server Profile" setting for Configure default synchronization method. This parameter accepts Email Server Profile record's guid. To get all profiles, use Get-CrmEmailServerProfiles command and use ProfileId.
-
-
-
-
- DisableSocialCare
-
- System.Management.Automation.ParameterAttribute
- System.Management.Automation.ArgumentTypeConverterAttribute
-
-
- Change "Prevent feature from receiving social data in CRM" setting.
-
-
-
-
- DisplayNavigationTour
-
- System.Management.Automation.ParameterAttribute
- System.Management.Automation.ArgumentTypeConverterAttribute
-
-
- Change "Display welcome screen to users when they sign in" setting.
-
-
-
-
- EmailConnectionChannel
-
- System.Management.Automation.ParameterAttribute
- System.Management.Automation.ArgumentTypeConverterAttribute
-
-
- Change "Process Email Using" setting. This parameter accepts int. To get all options, use Get-CrmEntityOptionSet organization emailcommunicationchannel | % Items command and use PickListItemId.
-
-
-
-
- EmailCorrelationEnabled
-
- System.Management.Automation.ParameterAttribute
- System.Management.Automation.ArgumentTypeConverterAttribute
-
-
- Change "User correlation to track email conversations" setting.
-
-
-
-
- EnableBingMapsIntegration
-
- System.Management.Automation.ParameterAttribute
- System.Management.Automation.ArgumentTypeConverterAttribute
-
-
- Change "Show Bing Maps on forms" setting.
-
-
-
-
- EnableSmartMatching
-
- System.Management.Automation.ParameterAttribute
- System.Management.Automation.ArgumentTypeConverterAttribute
-
-
- Change "Use Smart Matching" setting.
-
-
-
-
- FullNameConventionCode
-
- System.Management.Automation.ParameterAttribute
- System.Management.Automation.ArgumentTypeConverterAttribute
-
-
- Change "Name Format" setting for full-name fields. This parameters accept int. To get all options, use Get-CrmEntityOptionSet organization fullnameconventioncode | % Items command and use PickListItemId.
-
-
-
-
- GenerateAlertsForErrors
-
- System.Management.Automation.ParameterAttribute
- System.Management.Automation.ArgumentTypeConverterAttribute
-
-
- Change "Error level of Configure Alerts" setting.
-
-
-
-
- GenerateAlertsForWarnings
-
- System.Management.Automation.ParameterAttribute
- System.Management.Automation.ArgumentTypeConverterAttribute
-
-
- Change "Warning level of Configure Alerts" setting.
-
-
-
-
- GenerateAlertsForInformation
-
- System.Management.Automation.ParameterAttribute
- System.Management.Automation.ArgumentTypeConverterAttribute
-
-
- Change "Information level of Configure Alerts" setting.
-
-
-
-
- GlobalAppendUrlParametersEnabled
-
- System.Management.Automation.ParameterAttribute
- System.Management.Automation.ArgumentTypeConverterAttribute
-
-
- Change "Append parameters to URL" setting.
-
-
-
-
- GlobalHelpUrl
-
- System.Management.Automation.ValidatePatternAttribute
- System.Management.Automation.ParameterAttribute
- System.Management.Automation.ArgumentTypeConverterAttribute
-
-
- Change "Global custom Help URL" value.
-
-
-
-
- GlobalHelpUrlEnabled
-
- System.Management.Automation.ParameterAttribute
- System.Management.Automation.ArgumentTypeConverterAttribute
-
-
- Change "Use custom Help for customizable entities" setting.
-
-
-
-
- HashDeltaSubjectCount
-
- System.Management.Automation.ParameterAttribute
- System.Management.Automation.ArgumentTypeConverterAttribute
-
-
- Change "Maximum difference allowed between subject keywords" setting.
-
-
-
-
- HashFilterKeywords
-
- System.Management.Automation.ParameterAttribute
- System.Management.Automation.ArgumentTypeConverterAttribute
-
-
- Change "Filter subject keywords" setting.
-
-
-
-
- HashMaxCount
-
- System.Management.Automation.ParameterAttribute
- System.Management.Automation.ArgumentTypeConverterAttribute
-
-
- Change "Maximum number of subject keywords or recipients" setting.
-
-
-
-
- HashMinAddressCount
-
- System.Management.Automation.ParameterAttribute
- System.Management.Automation.ArgumentTypeConverterAttribute
-
-
- Change "Minimum number of recipients required to match" setting.
-
-
-
-
- IgnoreInternalEmail
-
- System.Management.Automation.ParameterAttribute
- System.Management.Automation.ArgumentTypeConverterAttribute
-
-
- Change "Track emails sent between CRM users as two activities" setting.
-
-
-
-
- IncomingEmailDeliveryMethod
-
- System.Management.Automation.ParameterAttribute
- System.Management.Automation.ArgumentTypeConverterAttribute
-
-
- Change "Incoming Email" setting for Configure default synchronization method. This parameter accepts int. To get all options, use Get-CrmEntityOptionSet mailbox incomingemaildeliverymethod | % Items command and use PickListItemId.
-
-
-
-
- InvoicePrefix
-
- System.Management.Automation.ParameterAttribute
- System.Management.Automation.ArgumentTypeConverterAttribute
-
-
- Prefix to use for all invoice numbers throughout Microsoft Dynamics CRM.
-
-
-
- IsAutoSaveEnabled
-
- System.Management.Automation.ParameterAttribute
- System.Management.Automation.ArgumentTypeConverterAttribute
-
-
- Change "Enable auto save on all forms" setting.
-
-
-
-
- IsDefaultCountryCodeCheckEnabled
-
- System.Management.Automation.ParameterAttribute
- System.Management.Automation.ArgumentTypeConverterAttribute
-
-
- Change "Enable country/region code prefixing" setting.
-
-
-
-
- IsDuplicateDetectionEnabled
-
- System.Management.Automation.ParameterAttribute
- System.Management.Automation.ArgumentTypeConverterAttribute
-
-
- Indicates whether duplicate detection of records is enabled.
-
-
-
-
- IsDuplicateDetectionEnabledForImport
-
- System.Management.Automation.ParameterAttribute
- System.Management.Automation.ArgumentTypeConverterAttribute
-
-
- Indicates whether duplicate detection of records during import is enabled.
-
-
-
-
- IsDuplicateDetectionEnabledForOfflineSync
-
- System.Management.Automation.ParameterAttribute
- System.Management.Automation.ArgumentTypeConverterAttribute
-
-
- Indicates whether duplicate detection of records during offline synchronization is enabled.
-
-
-
-
- IsDuplicateDetectionEnabledForOnlineCreateUpdate
-
- System.Management.Automation.ParameterAttribute
- System.Management.Automation.ArgumentTypeConverterAttribute
-
-
- Indicates whether duplicate detection during online create or update is enabled.
-
-
-
-
- IsFolderBasedTrackingEnabled
-
- System.Management.Automation.ParameterAttribute
- System.Management.Automation.ArgumentTypeConverterAttribute
-
-
- Change "Use folder-level tracking for Exchange folders" setting. Supported at v7.1 or above.
-
-
-
-
- IsFullTextSearchEnabled
-
- System.Management.Automation.ParameterAttribute
- System.Management.Automation.ArgumentTypeConverterAttribute
-
-
- Change "Enable full-text search for Quick Find" setting.
-
-
-
-
- IsHierarchicalSecurityModelEnabled
-
- System.Management.Automation.ParameterAttribute
- System.Management.Automation.ArgumentTypeConverterAttribute
-
-
- Indicates whether the hierarchical security model is enabled.
-
-
-
-
- IsPresenceEnabled
-
- System.Management.Automation.ParameterAttribute
- System.Management.Automation.ArgumentTypeConverterAttribute
-
-
- Change "Enable presence for the system" setting.
-
-
-
-
- IsUserAccessAuditEnabled
-
- System.Management.Automation.ParameterAttribute
- System.Management.Automation.ArgumentTypeConverterAttribute
-
-
- Change "Audit user access" setting.
-
-
-
-
- KbPrefix
-
- System.Management.Automation.ParameterAttribute
- System.Management.Automation.ArgumentTypeConverterAttribute
-
-
- Prefix to use for all articles in Microsoft Dynamics CRM.
-
-
-
-
- MaxAppointmentDurationDays
-
- System.Management.Automation.ParameterAttribute
- System.Management.Automation.ArgumentTypeConverterAttribute
-
-
- Set "Maximum durations of an appointment in days" setting.
-
-
-
-
- MaxDepthForHierarchicalSecurityModel
-
- System.Management.Automation.ParameterAttribute
- System.Management.Automation.ArgumentTypeConverterAttribute
-
-
- Maximum depth for hierarchy security propagation.
-
-
-
-
- MaximumActiveBusinessProcessFlowsAllowedPerEntity
-
- System.Management.Automation.ParameterAttribute
- System.Management.Automation.ArgumentTypeConverterAttribute
-
-
- Maximum number of active business process flows allowed per entity.
-
-
-
-
- MaximumDynamicPropertiesAllowed
-
- System.Management.Automation.ParameterAttribute
- System.Management.Automation.ArgumentTypeConverterAttribute
-
-
- Maximum number of product properties for a product family or bundle.
-
-
-
- MaximumTrackingNumber
-
- System.Management.Automation.ParameterAttribute
- System.Management.Automation.ArgumentTypeConverterAttribute
-
-
- Change "Number of digits for incremental message counter" setting. Specify 999 will set 3 as setting, 9999 will set 4 as setting and you can set up to 999999999. You can disable "Use Tracking Token" by setting 0.
-
-
-
-
- MaxProductsInBundle
-
- System.Management.Automation.ParameterAttribute
- System.Management.Automation.ArgumentTypeConverterAttribute
-
-
- Maximum number of items in a bundle.
-
-
-
- MaxRecordsForExportToExcel
-
- System.Management.Automation.ParameterAttribute
- System.Management.Automation.ArgumentTypeConverterAttribute
-
-
- Maximum number of records that will be exported to a static Microsoft Office Excel worksheet when exporting from the grid.
-
-
-
-
- MaxRecordsForLookupFilters
-
- System.Management.Automation.ParameterAttribute
- System.Management.Automation.ArgumentTypeConverterAttribute
-
-
- Maximum number of lookup and picklist records that can be selected by user for filtering.
-
-
-
-
- MaxUploadFileSize
-
- System.Management.Automation.ParameterAttribute
- System.Management.Automation.ArgumentTypeConverterAttribute
-
-
- Maximum allowed size of an attachment.
-
-
-
-
- MinAddressBookSyncInterval
-
- System.Management.Automation.ParameterAttribute
- System.Management.Automation.ArgumentTypeConverterAttribute
-
-
- Change "Minimum time between address book synchronizations" setting.
-
-
-
-
- MinOfflineSyncInterval
-
- System.Management.Automation.ParameterAttribute
- System.Management.Automation.ArgumentTypeConverterAttribute
-
-
- Change "Minimum time between background local data synchronizations" setting.
-
-
-
-
- MinOutlookSyncInterval
-
- System.Management.Automation.ParameterAttribute
- System.Management.Automation.ArgumentTypeConverterAttribute
-
-
- Change "Minimum time between synchronizations" setting.
-
-
-
-
- NotifyMailboxOwnerOfEmailServerLevelAlerts
-
- System.Management.Automation.ParameterAttribute
- System.Management.Automation.ArgumentTypeConverterAttribute
-
-
- Change "Notify mailbox owner" setting.
-
-
-
-
- OrderPrefix
-
- System.Management.Automation.ParameterAttribute
- System.Management.Automation.ArgumentTypeConverterAttribute
-
-
- Prefix to use for all orders throughout Microsoft Dynamics CRM.
-
-
-
-
- OutgoingEmailDeliveryMethod
-
- System.Management.Automation.ParameterAttribute
- System.Management.Automation.ArgumentTypeConverterAttribute
-
-
- Change "Outgoing Email" setting for Configure default synchronization method. This parameter accepts int. To get all options, use Get-CrmEntityOptionSet mailbox outgoingemaildeliverymethod | % Items command and use PickListItemId.
-
-
-
-
- PluginTraceLogSetting
-
- System.Management.Automation.ValidateSetAttribute
- System.Management.Automation.ParameterAttribute
- System.Management.Automation.ArgumentTypeConverterAttribute
-
-
- Change "Enable logging to plug-in trace log" setting. 0:Off 1:Exception 2:All
-
-
-
-
- PricingDecimalPrecision
-
- System.Management.Automation.ValidateSetAttribute
- System.Management.Automation.ParameterAttribute
- System.Management.Automation.ArgumentTypeConverterAttribute
-
-
- Change "Pricing Decimal Precision" setting.
-
-
-
-
- QuickFindRecordLimitEnabled
-
- System.Management.Automation.ParameterAttribute
- System.Management.Automation.ArgumentTypeConverterAttribute
-
-
- Change "Enable Quick Find record limits" setting.
-
-
-
-
- QuotePrefix
-
- System.Management.Automation.ParameterAttribute
- System.Management.Automation.ArgumentTypeConverterAttribute
-
-
- Prefix to use for all quotes throughout Microsoft Dynamics CRM.
-
-
-
-
- RequireApprovalForUserEmail
-
- System.Management.Automation.ParameterAttribute
- System.Management.Automation.ArgumentTypeConverterAttribute
-
-
- Change "Process emails only for approved users" setting.
-
-
-
- RequireApprovalForQueueEmail
-
- System.Management.Automation.ParameterAttribute
- System.Management.Automation.ArgumentTypeConverterAttribute
-
-
- Change "Process emails only for approved queues" setting.
-
-
-
- ShareToPreviousOwnerOnAssign
-
- System.Management.Automation.ParameterAttribute
- System.Management.Automation.ArgumentTypeConverterAttribute
-
-
- Change "Share reassigned records with original owner" setting.
-
-
-
- TrackingPrefix
-
- System.Management.Automation.ParameterAttribute
- System.Management.Automation.ArgumentTypeConverterAttribute
-
-
- Change Tracking Token "Prefix" setting.
-
-
-
- TrackingTokenIdBase
-
- System.Management.Automation.ParameterAttribute
- System.Management.Automation.ArgumentTypeConverterAttribute
-
-
- Change "Deployment base tracking number" setting.
-
-
-
- TrackingTokenIdDigits
-
- System.Management.Automation.ParameterAttribute
- System.Management.Automation.ArgumentTypeConverterAttribute
-
-
- Change "Number of digits for user numbers" setting
-
-
-
-
- UniqueSpecifierLength
-
- System.Management.Automation.ParameterAttribute
- System.Management.Automation.ArgumentTypeConverterAttribute
-
-
- Number of characters appended to invoice, quote, and order numbers.
-
-
-
-
- UseLegacyRendering
-
- System.Management.Automation.ParameterAttribute
- System.Management.Automation.ArgumentTypeConverterAttribute
-
-
- Change "Use legacy form rendering" setting.
-
-
-
-
- UsePositionHierarchy
-
- System.Management.Automation.ParameterAttribute
- System.Management.Automation.ArgumentTypeConverterAttribute
-
-
- Indicates whether to use position hierarchy.
-
-
-
-
- UseSkypeProtocol
-
- System.Management.Automation.ParameterAttribute
- System.Management.Automation.ArgumentTypeConverterAttribute
-
-
- Change "Select provider for Click to call" setting. $true: Skype $false: Lync
-
-
-
-
- AcknowledgementTemplateId
-
- System.Management.Automation.ParameterAttribute
- System.Management.Automation.ArgumentTypeConverterAttribute
-
-
-
-
-
-
- AllowUserFormModePreference
-
- System.Management.Automation.ParameterAttribute
- System.Management.Automation.ArgumentTypeConverterAttribute
-
-
-
-
-
-
- AMDesignator
-
- System.Management.Automation.ParameterAttribute
- System.Management.Automation.ArgumentTypeConverterAttribute
-
-
-
-
-
-
- AutoApplyDefaultonCaseCreate
-
- System.Management.Automation.ParameterAttribute
- System.Management.Automation.ArgumentTypeConverterAttribute
-
-
-
-
-
-
- AutoApplyDefaultonCaseUpdate
-
- System.Management.Automation.ParameterAttribute
- System.Management.Automation.ArgumentTypeConverterAttribute
-
-
-
-
-
-
- AutoApplySLA
-
- System.Management.Automation.ParameterAttribute
- System.Management.Automation.ArgumentTypeConverterAttribute
-
-
-
-
-
-
- BingMapsApiKey
-
- System.Management.Automation.ParameterAttribute
- System.Management.Automation.ArgumentTypeConverterAttribute
-
-
-
-
-
-
- BusinessClosureCalendarId
-
- System.Management.Automation.ParameterAttribute
- System.Management.Automation.ArgumentTypeConverterAttribute
-
-
-
-
-
-
- CascadeStatusUpdate
-
- System.Management.Automation.ParameterAttribute
- System.Management.Automation.ArgumentTypeConverterAttribute
-
-
-
-
-
-
- CortanaProactiveExperienceEnabled
-
- System.Management.Automation.ParameterAttribute
- System.Management.Automation.ArgumentTypeConverterAttribute
-
-
-
-
-
-
- CreateProductsWithoutParentInActiveState
-
- System.Management.Automation.ParameterAttribute
- System.Management.Automation.ArgumentTypeConverterAttribute
-
-
-
-
-
-
- CurrencyDecimalPrecision
-
- System.Management.Automation.ParameterAttribute
- System.Management.Automation.ArgumentTypeConverterAttribute
-
-
-
-
-
-
- isenabledforallroles
-
- System.Management.Automation.ParameterAttribute
- System.Management.Automation.ArgumentTypeConverterAttribute
-
-
-
-
-
-
- UseAllowUsersSeeAppdownloadMessage
-
- System.Management.Automation.ParameterAttribute
- System.Management.Automation.ArgumentTypeConverterAttribute
-
-
-
-
-
-
- DefaultCrmCustomName
-
- System.Management.Automation.ParameterAttribute
- System.Management.Automation.ArgumentTypeConverterAttribute
-
-
-
-
-
-
- SuppressSLA
-
- System.Management.Automation.ParameterAttribute
- System.Management.Automation.ArgumentTypeConverterAttribute
-
-
-
-
-
-
- IsAuditEnabled
-
- System.Management.Automation.ParameterAttribute
- System.Management.Automation.ArgumentTypeConverterAttribute
-
-
-
-
-
-
- AllowLegacyClientExperience
-
- System.Management.Automation.ParameterAttribute
- System.Management.Automation.ArgumentTypeConverterAttribute
-
-
-
-
-
-
-
-
- Example 1
- Set-CrmSystemSettings -conn $conn -IsAutoSaveEnabled $false
- This example disables "Enable auto save on all forms" System setting.
-
-
-
- Example 2
- Set-CrmSystemSettings -conn $conn -FullNameConventionCode 7
-
- This example updates "Name Format" of Set the full-name format to "Last NameFirst Name" System setting.
-
-
-
-
- Example 3
- Set-CrmSystemSettings -IsAutoSaveEnabled $false
-
- This example disables "Enable auto save on all forms" System setting by omitting -conn parameter.
-When omitting conn parameter, cmdlets automatically finds it.
-
-
-
-
-
- false
-
-
- Set-CrmUserBusinessUnit
-
- Set-CrmUserBusinessUnit [-conn <CrmServiceClient>] [-UserId] <Guid> [-BusinessUnitId] <Guid> [[-ReassignUserId] <Guid>]
-
-
- Moves Crm User to another Business Unit.
-
- The Set-CrmUserBusinessUnit lets you move Crm User to another Business Unit. You can specify different CRM UserId to ReassignUserId to update ownership of records as well.
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- conn
-
- System.Management.Automation.ParameterAttribute
- System.Management.Automation.ArgumentTypeConverterAttribute
-
-
- A connection to your CRM organization. Use $conn = Get-CrmConnection <Parameters> to generate it.
-
-
-
-
- UserId
-
- System.Management.Automation.ParameterAttribute
- System.Management.Automation.ArgumentTypeConverterAttribute
-
-
- An Id (guid) of CRM User which moves to another Business Unit.
-
-
-
-
- BusinessUnitId
-
- System.Management.Automation.ParameterAttribute
- System.Management.Automation.ArgumentTypeConverterAttribute
-
-
- An Id (guid) of Business Unit.
-
-
-
-
- ReassignUserId
-
- System.Management.Automation.ParameterAttribute
- System.Management.Automation.ArgumentTypeConverterAttribute
-
-
- An Id (guid) of CRM User to own records of Moving CRM User. You can specify same Id as UserId or omit it if you want to keep records ownership.
-
-
-
-
-
-
- Example 1
- Set-CrmUserBusinessUnit -conn $conn -UserId 3772fe6e-8a18-e511-80dc-c4346bc42d48 -BusinessUnitId 5a18974c-ae18-e511-80dd-c4346bc44d24 -ReassignUserId 3772fe6e-8a18-e511-80dc-c4346bc42d48
-
- This example moves a CRM User to specified BusinessUnit, then keeps the records ownership.
-
-
-
-
- Example 2
- Set-CrmUserBusinessUnit 3772fe6e-8a18-e511-80dc-c4346bc42d48 5a18974c-ae18-e511-80dd-c4346bc44d24 f9d40920-7a43-4f51-9749-0549c4caf67d
-
- This example moves a CRM User to specified BusinessUnit, then reassign the records ownership by omitting parameters names.
-When omitting parameter names, you do not provide $conn, cmdlets automatically finds it.
-
-
-
-
-
- false
-
-
- Set-CrmUserMailbox
-
- Set-CrmUserMailbox [-conn <CrmServiceClient>] [-UserId] <String> [-EmailAddress <String>] [-EmailServerProfile <Guid>] [-IncomingEmailDeliveryMethod <Int32>] [-OutgoingEmailDeliveryMethod <Int32>] [-ACTDeliveryMethod <Int32>]
- Set-CrmUserMailbox [-conn <CrmServiceClient>] [-UserId] <String> [-EmailAddress <String>] [-ApplyDefaultEmailSettings]
- Set-CrmUserMailbox [-conn <CrmServiceClient>] [-UserId] <String> [-EmailAddress <String>] [-StateCode <String>] [-StatusCode <String>] [-ScheduleTest] [-MarkedAsPrimaryForExchangeSync] [-ApproveEmail]
-
-
- Updates CRM user's mailibox.
-
- The Set-CrmUserMailbox cmdlet lets you update CRM user's mailibox. Use Get-CrmUserMailbox to confirm current values.
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- conn
-
- System.Management.Automation.ParameterAttribute
- System.Management.Automation.ArgumentTypeConverterAttribute
-
-
- A connection to your CRM organization. Use $conn = Get-CrmConnection <Parameters> to generate it.
-
-
-
-
- UserId
-
- System.Management.Automation.ParameterAttribute
- System.Management.Automation.ArgumentTypeConverterAttribute
-
-
- An Id of CRM user.
-
-
-
-
- EmailAddress
-
- System.Management.Automation.ParameterAttribute
- System.Management.Automation.ArgumentTypeConverterAttribute
-
-
- An EmailAddress of CRM user.
-
-
-
-
- EmailServerProfile
-
- System.Management.Automation.ParameterAttribute
- System.Management.Automation.ArgumentTypeConverterAttribute
-
-
- Change "Server Profile" setting of Synchronization Method. This parameter accepts Email Server Profile record's guid. To get all profiles, use Get-CrmEmailServerProfiles command and use ProfileId.
-
-
-
-
- IncomingEmailDeliveryMethod
-
- System.Management.Automation.ParameterAttribute
- System.Management.Automation.ArgumentTypeConverterAttribute
-
-
- Change "Incoming Email" setting for Configure default synchronization method. This parameter accepts int. To get all options, use Get-CrmEntityOptionSet mailbox incomingemaildeliverymethod | % Items command and use PickListItemId.
-
-
-
-
- OutgoingEmailDeliveryMethod
-
- System.Management.Automation.ParameterAttribute
- System.Management.Automation.ArgumentTypeConverterAttribute
-
-
- Change "Outgoing Email" setting for Configure default synchronization method. This parameter accepts int. To get all options, use Get-CrmEntityOptionSet mailbox outgoingemaildeliverymethod | % Items command and use PickListItemId.
-
-
-
-
- ACTDeliveryMethod
-
- System.Management.Automation.ParameterAttribute
- System.Management.Automation.ArgumentTypeConverterAttribute
-
-
- Change "Appointments, Contact, and Tasks" setting for Configure default synchronization method. This parameter accepts int. To get all options, use Get-CrmEntityOptionSet mailbox actdeliverymethod | % Items command and use PickListItemId.
-
-
-
-
- ApplyDefaultEmailSettings
-
- System.Management.Automation.ParameterAttribute
- System.Management.Automation.ArgumentTypeConverterAttribute
-
-
- Specify this to apply the organization default settings
-
-
-
- StateCode
-
- System.Management.Automation.ParameterAttribute
- System.Management.Automation.ArgumentTypeConverterAttribute
-
-
- StateCode value for a record. You can retrieve values by using Get-CrmEntityOptionSet <EntityLogicalName> statecode | % {$_.Items}
-
-
-
-
- StatusCode
-
- System.Management.Automation.ParameterAttribute
- System.Management.Automation.ArgumentTypeConverterAttribute
-
-
- StatusCode value for a record. You can retrieve values by using Get-CrmEntityOptionSet <EntityLogicalName> statuscode | % {$_.Items}
-
-
-
- ScheduleTest
-
- System.Management.Automation.ParameterAttribute
- System.Management.Automation.ArgumentTypeConverterAttribute
-
-
- Specify this to schedule test for the mailbox
-
-
-
- MarkedAsPrimaryForExchangeSync
-
- System.Management.Automation.ParameterAttribute
- System.Management.Automation.ArgumentTypeConverterAttribute
-
-
- Specify this to mark the mailbox as primary mailbox to sync with Exchange Online
-
-
-
- ApproveEmail
-
- System.Management.Automation.ParameterAttribute
- System.Management.Automation.ArgumentTypeConverterAttribute
-
-
- Specify this to approve the emailaddress.
-
-
-
-
-
- Example 1
- Set-CrmUserMailbox -conn $conn -UserId f9d40920-7a43-4f51-9749-0549c4caf67d -IncomingEmailDeliveryMethod 0
-
- This example updates "Incoming Email" setting to "None".
-
-
-
-
- Example 2
- Set-CrmUserMailbox -conn $conn -UserId f9d40920-7a43-4f51-9749-0549c4caf67d -EmailServerProfile 1b2d4b03-831e-e511-80e1-c4346bc44d24
-
- This example updates "Server Profile" setting to specified Profile.
-
-
-
-
- Example 3
- Set-CrmUserMailbox -conn $conn -UserId f9d40920-7a43-4f51-9749-0549c4caf67d -ApplyDefaultEmailSettings
-
- This example updates mailbox email settings to default settings, which is in System Settings.
-
-
-
-
- Example 4
- Set-CrmUserMailbox -UserId f9d40920-7a43-4f51-9749-0549c4caf67d -IncomingEmailDeliveryMethod 0
-
- This example disables "Incoming Email" setting to "None" by omitting -conn parameter.
-When omitting conn parameter, cmdlets automatically finds it.
-
-
-
- Example 5
- Set-CrmUserMailbox -UserId f9d40920-7a43-4f51-9749-0549c4caf67d -ApplyDefaultEmailSettings
-
- This example updates mailbox email settings to default settings, which is in System Settings by omitting -conn parameter.
-When omitting conn parameter, cmdlets automatically finds it.
-
-
-
- Example 6
- Set-CrmUserMailbox -conn $conn -UserId f9d40920-7a43-4f51-9749-0549c4caf67d -StateCode Active -StatusCode Active -ScheduleTest -MarkedAsPrimaryForExchangeSync -ApproveEmail
- This example activates mailbox, approve emailaddress, schedule test and set the mailbox as primary for sync with Exchange Online.
-
-
-
-
-
- false
-
-
- Test-CrmSampleDataInstalled
-
- Test-CrmSampleDataInstalled [[-conn] <CrmServiceClient>]
-
-
- Checks if sample data has been installed to CRM Organization.
-
- The Test-CrmSampleDataInstalled cmdlet lets you Check if sample data has been installed to CRM Organization.
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- conn
-
- System.Management.Automation.ParameterAttribute
- System.Management.Automation.ArgumentTypeConverterAttribute
-
-
- A connection to your CRM organization. Use $conn = Get-CrmConnection <Parameters> to generate it.
-
-
-
-
-
-
- Example 1
- Test-CrmSampleDataInstalled -conn $conn
-
- This example checks if sample data has been installed.
-
-
-
-
- Example 2
- Test-CrmSampleDataInstalled
-
- This example checks if sample data has been installed by omitting parameter names.
-When omitting parameter names, you do not provide $conn, cmdlets automatically finds it.
-
-
-
-
-
- false
-
-
- Test-CrmViewPerformance
-
- Test-CrmViewPerformance [-conn <CrmServiceClient>] [-View] <PSObject> [-RunAsViewOwner] [-RunAs <Guid>] [-IsUserView]
- Test-CrmViewPerformance [-conn <CrmServiceClient>] [-ViewId] <Guid> [-RunAsViewOwner] [-RunAs <Guid>] [-IsUserView]
- Test-CrmViewPerformance [-conn <CrmServiceClient>] [-ViewName] <String> [-RunAsViewOwner] [-RunAs <Guid>] [-IsUserView]
-
-
- Test CRM View performance.
-
- The Test-CrmViewPerformance cmdlet lets you test CRM View performance.
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- conn
-
- System.Management.Automation.ParameterAttribute
- System.Management.Automation.ArgumentTypeConverterAttribute
-
-
- A connection to your CRM organization. Use $conn = Get-CrmConnection <Parameters> to generate it.
-
-
-
-
- View
-
- System.Management.Automation.AliasAttribute
- System.Management.Automation.ParameterAttribute
- System.Management.Automation.ArgumentTypeConverterAttribute
-
-
- CrmRecord
-
- A view record object to test performance.
-
-
-
-
- RunAsViewOwner
-
- System.Management.Automation.ParameterAttribute
- System.Management.Automation.ArgumentTypeConverterAttribute
-
-
- Indicate if using view owner's id to run the view to test performance.
-
-
-
-
- RunAs
-
- System.Management.Automation.ParameterAttribute
- System.Management.Automation.ArgumentTypeConverterAttribute
-
-
- Specify User Id to run the view to test performance.
-
-
-
-
- IsUserView
-
- System.Management.Automation.ParameterAttribute
- System.Management.Automation.ArgumentTypeConverterAttribute
-
-
- Indicate if the view is user owned view.
-
-
-
-
- ViewId
-
- System.Management.Automation.AliasAttribute
- System.Management.Automation.ParameterAttribute
- System.Management.Automation.ArgumentTypeConverterAttribute
-
-
- Id
-
- A view id to test performance.
-
-
-
-
- ViewName
-
- System.Management.Automation.ParameterAttribute
- System.Management.Automation.ArgumentTypeConverterAttribute
-
-
- A view name to test performance.
-
-
-
-
-
-
- Example 1
- Test-CrmViewPerformance -conn $conn -ViewName "Active Accounts"
-
- This example test "Active Accounts" system view performance by using user of the connection.
-
-
-
-
- Example 2
- Test-CrmViewPerformance -conn $conn -ViewId 00000000-0000-0000-00aa-000010001002
-
- This example test view which has id of 00000000-0000-0000-00aa-000010001002 performance by using user of the connection.
-
-
-
-
- Example 3
- Test-CrmViewPerformance -conn $conn -ViewName "Active Accounts"
-
- This example test "Active Accounts" system view performance by using user of the connection.
-
-
-
-
- Example 4
- Test-CrmViewPerformance -conn $conn -ViewName "Active Accounts" -RunAs f9d40920-7a43-4f51-9749-0549c4caf67d
-
- This example test "Active Accounts" system view performance by using specified user.
-
-
-
-
- Example 5
- Test-CrmViewPerformance -conn $conn -ViewName "My Custom View" -RunAsViewOwner -IsUserView
-
- This example test "My Custom View" user view performance by using view owner.
-
-
-
-
-
-
- false
-
-
- Add-CrmNoteToCrmRecord
-
- Add-CrmNoteToCrmRecord [-conn <CrmServiceClient>] [-CrmRecord] <PSObject> [-Subject] <String> [-NoteText] <String>
- Add-CrmNoteToCrmRecord [-conn <CrmServiceClient>] [-EntityLogicalName] <String> [-Id] <Guid> [-Subject] <String> [-NoteText] <String>
-
-
- Create a new note (annotation) to a record.
- The Add-CrmNoteToCrmRecord cmdlet lets you add a note (annotation) to a record.
-
-There are two ways to specify a target record.
-
-1. Pass EntityLogicalName and record's Id.
-2. Get a record object by using Get-CrmRecord/Get-CrmRecords cmdlets, and pass it.
-
-You can specify note subject and body by using -Subject and -NoteText parameters
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- conn
-
- System.Management.Automation.ParameterAttribute
- System.Management.Automation.ArgumentTypeConverterAttribute
-
-
- A connection to your CRM organization. Use $conn = Get-CrmConnection <Parameters> to generate it.
-
-
-
- CrmRecord
-
- System.Management.Automation.ParameterAttribute
- System.Management.Automation.ArgumentTypeConverterAttribute
-
-
- A record object which is obtained via Get-CrmRecord/Get-CrmRecords. When you pass CrmRecord, then you don't use EntityLogicalName/Id.
-
-
-
- Subject
-
- System.Management.Automation.ParameterAttribute
- System.Management.Automation.ArgumentTypeConverterAttribute
-
-
- Subject of a note (annotation).
-
-
-
- NoteText
-
- System.Management.Automation.ParameterAttribute
- System.Management.Automation.ArgumentTypeConverterAttribute
-
-
- Body Text of a note (annotation).
-
-
-
- EntityLogicalName
-
- System.Management.Automation.ParameterAttribute
- System.Management.Automation.ArgumentTypeConverterAttribute
-
-
- A logicalname of the target record. i.e.)accout, contact, lead, etc..
-
-
-
- Id
-
- System.Management.Automation.ParameterAttribute
- System.Management.Automation.ArgumentTypeConverterAttribute
-
-
- An Id (guid) of the record
-
-
-
-
-
- Example 1
- Add-CrmNote -conn $conn -EntityLogicalName account -Id 00005a70-6317-e511-80da-c4346bc43d94 -Subject "sample subject" -NoteText "sample body"
- This example add a note (annotation) to an account record.
-
-
-
- Example 2
- Add-CrmNote account 00005a70-6317-e511-80da-c4346bc43d94 "sample subject" "sample body"
- This example add a note (annotation) to an account record by ommiting parameters names.
-When ommiting parameter names, you do not provide $conn, cmdlets automatically finds it.
-
-
-
-
-
- false
-
-
- Get-CrmLicenseSummary
-
- Get-CrmLicenseSummary [[-conn] <CrmServiceClient>]
-
-
- Displays License assignment and AccessMode/CalType summary.
-
- The Get-CrmLicenseSummery cmdlet lets you display License assignment and AccessMode/CalType summery.
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- conn
-
- System.Management.Automation.ParameterAttribute
- System.Management.Automation.ArgumentTypeConverterAttribute
-
-
- A connection to your CRM organization. Use $conn = Get-CrmConnection <Parameters> to generate it.
-
-
-
-
-
-
- Example 1
- Get-CrmLicenseSummary -conn $conn
-
- This example displays License assignment and AccessMode/CalType summery.
-
-
-
-
- Example 2
- Get-CrmLicenseSummary
-
- This example displays License assignment and AccessMode/CalType summery by omitting parameter names.
-When omitting parameter names, you do not provide $conn, cmdlets automatically finds it.
-
-
-
-
-
- false
-
-
- Get-CrmOrgDbOrgSettings
-
- Get-CrmOrgDbOrgSettings [[-conn] <CrmServiceClient>]
-
-
- Retrieves CrmOrgDbOrgSettings.
-
- The Get-CrmOrgDbOrgSettings cmdlet lets you retrieve CrmOrgDbOrgSettings.
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- conn
-
- System.Management.Automation.ParameterAttribute
- System.Management.Automation.ArgumentTypeConverterAttribute
-
-
- A connection to your CRM organization. Use $conn = Get-CrmConnection <Parameters> to generate it.
-
-
-
-
-
-
- Example 1
- Get-CrmOrgDbOrgSettings -conn $conn
- This example retrieves CrmOrgDbOrgSettings.
-
-
-
- Example 2
- Get-CrmOrgDbOrgSettings contact
-
-
-
-
-
-
- false
-
-
- Get-CrmSiteMap
-
- Get-CrmSiteMap [-conn <CrmServiceClient>] [-SiteXml]
- Get-CrmSiteMap [-conn <CrmServiceClient>] [-Areas]
- Get-CrmSiteMap [-conn <CrmServiceClient>] [-GroupsOfArea <String>]
- Get-CrmSiteMap [-conn <CrmServiceClient>] [-SubAreasOfArea <String>]
-
-
- Retrieves CRM Organization's SiteMap information.
-
- The Get-CrmSiteMap cmdlet lets you retrieve CRM Organization's SiteMap information.
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- conn
-
- System.Management.Automation.ParameterAttribute
- System.Management.Automation.ArgumentTypeConverterAttribute
-
-
- A connection to your CRM organization. Use $conn = Get-CrmConnection <Parameters> to generate it.
-
-
-
-
- SiteXml
-
- System.Management.Automation.ParameterAttribute
- System.Management.Automation.ArgumentTypeConverterAttribute
-
-
- Specify SiteXml switch to retrieve SiteMapXml xml data.
-
-
-
-
- Areas
-
- System.Management.Automation.ParameterAttribute
- System.Management.Automation.ArgumentTypeConverterAttribute
-
-
- Specify Areas switch to retrieve AreaIds list.
-
-
-
-
- GroupsOfArea
-
- System.Management.Automation.ParameterAttribute
- System.Management.Automation.ArgumentTypeConverterAttribute
-
-
- Passing AreaId to GroupsOfArea parameter retrievs GroupIds of the specified Area.
-
-
-
-
- SubAreasOfArea
-
- System.Management.Automation.ParameterAttribute
- System.Management.Automation.ArgumentTypeConverterAttribute
-
-
- Passing AreaId to SubAreasOfArea parameter retrievs SubAreaIds of the specified Area.
-
-
-
-
-
-
- Example 1
- Get-CrmSiteMap -conn $conn -SiteXml
-
- This example retrieves CRM Organization's SiteMap data.
-
-
-
-
- Example 2
- Get-CrmSiteMap -conn $conn -Areas
-
- This example retrieves AreaIds of CRM Organization's SiteMap.
-
-
-
-
- Example 3
- Get-CrmSiteMap -conn $conn -GroupsOfArea SFA
-
-
-
-
-
- Example 4
- This example retrieves GroupIds of CRM Organization's SiteMap.
-
- This example retrieves SubAreaIds of CRM Organization's SiteMap by omitting parameter names.
-When omitting parameter names, you do not provide $conn, cmdlets automatically finds it.
-
-
-
-
-
- false
-
-
- Get-CrmUserMailbox
-
- Get-CrmUserMailbox [-conn <CrmServiceClient>] [-UserId] <String>
-
-
- Retrieves CRM user's mailbox.
-
- The Get-CrmUserMailbox cmdlet lets you retrieve CRM user's mailbox.
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- conn
-
- System.Management.Automation.ParameterAttribute
- System.Management.Automation.ArgumentTypeConverterAttribute
-
-
- A connection to your CRM organization. Use $conn = Get-CrmConnection <Parameters> to generate it.
-
-
-
-
- UserId
-
- System.Management.Automation.ParameterAttribute
- System.Management.Automation.ArgumentTypeConverterAttribute
-
-
- An Id (guid) of CRM User.
-
-
-
-
-
-
- Example 1
- Get-CrmUserMailbox -conn $conn -UserId f9d40920-7a43-4f51-9749-0549c4caf67d
-
- This example retrieves User's mailbox.
-
-
-
-
- Example 2
- Get-CrmUserMailbox -conn $conn -UserId f9d40920-7a43-4f51-9749-0549c4caf67d -ShowDisplayName
-
- This example retrieves User's mailbox and shows DisplayName for each field.
-
-
-
-
- Example 3
- Get-CrmUserMailbox f9d40920-7a43-4f51-9749-0549c4caf67d -ShowDisplayName
-
-
-
-
-
-
-
- false
-
-
- Set-CrmUserManager
-
- Set-CrmUserManager [-conn <CrmServiceClient>] [-UserId] <Guid> [-ManagerId] <Guid> [-KeepChildUsers] <Boolean>
-
-
- Sets CRM user's manager.
-
- The Set-CrmUserManager lets you set CRM user's manager.
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- conn
-
- System.Management.Automation.ParameterAttribute
- System.Management.Automation.ArgumentTypeConverterAttribute
-
-
- A connection to your CRM organization. Use $conn = Get-CrmConnection <Parameters> to generate it.
-
-
-
-
- UserId
-
- System.Management.Automation.ParameterAttribute
- System.Management.Automation.ArgumentTypeConverterAttribute
-
-
- An Id (guid) of CRM User.
-
-
-
-
- ManagerId
-
- System.Management.Automation.ParameterAttribute
- System.Management.Automation.ArgumentTypeConverterAttribute
-
-
- An Id (guid) of Manager.
-
-
-
-
- KeepChildUsers
-
- System.Management.Automation.ParameterAttribute
- System.Management.Automation.ArgumentTypeConverterAttribute
-
-
- Specify if you keep child users for the user.
-
-
-
-
-
-
- Example 1
- Set-CrmUserManager -conn $conn -UserId 3772fe6e-8a18-e511-80dc-c4346bc42d48 -ManagerId 5a18974c-ae18-e511-80dd-c4346bc44d24 -KeepChildUsers $True
-
- This example sets a manager to a CRM User and keeps its child users.
-
-
-
-
- Example 2
- Set-CrmUserManager 3772fe6e-8a18-e511-80dc-c4346bc42d48 5a18974c-ae18-e511-80dd-c4346bc44d24 $True
-
- This example sets a manager to a CRM User and keeps its child users by omitting parameters names.
-When omitting parameter names, you do not provide $conn, cmdlets automatically finds it.
-
-
-
-
-
- false
-
-
- Set-CrmUserSettings
-
- Set-CrmUserSettings [-conn <CrmServiceClient>] [-CrmRecord] <PSObject>
-
-
- Update CRM user's settings.
- The Set-CrmUserSettings cmdlet lets you update CRM user's settings.
-
-
-
-
-
-
-
-
-
-
-
-
-
- conn
-
- System.Management.Automation.ParameterAttribute
- System.Management.Automation.ArgumentTypeConverterAttribute
-
-
- A connection to your CRM organization. Use $conn = Get-CrmConnection <Parameters> to generate it.
-
-
-
-
- CrmRecord
-
- System.Management.Automation.AliasAttribute
- System.Management.Automation.ParameterAttribute
- System.Management.Automation.ArgumentTypeConverterAttribute
-
-
- UserSettingsRecord
-
- A CRMUserSettings object. Use Get-CrmUserSettings to retrieve the setting.
-
-
-
-
-
- Example 1
- PS C:\>$userSettings = Get-CrmUserSettings -conn $conn -UserId (Get-MyCrmUserId) -Fields *
-PS C:\>$userSettings.timezonecode = 4
-PS C:\>Set-CrmUserSettings -conn $conn -CrmRecord $userSettings
- This example retrieves retrieves all fields from login User's UserSettings update TimeZone to Pacific Time.
-
-
-
-
- Example 2
- PS C:\>$userSettings = Get-CrmUserSettings (Get-MyCrmUserId) *
-PS C:\>$userSettings.paginglimit = 100
-PS C:\>Set-CrmUserSettings $userSettings
- This example retrieves all fields from login User's UserSettings and update PagingLimit to 100 by omitting parameter names.
-When omitting parameter names, you do not provide $conn, cmdlets automatically finds it.
-
-
-
-
-
- false
-
-
- Publish-CrmCustomization
-
- Publish-CrmCustomization [[-conn] <CrmServiceClient>] [-Entity] [[-EntityLogicalNames] <String[]>] [-Ribbon] [-SiteMap] [-Dashbord] [[-DashbordIds] <Guid[]>] [-OptionSet] [[-OptionSetNames] <String[]>] [-WebResource] [[-WebResourceIds] <Guid[]>]
-
-
- Publishes specified customizations for a CRM Organization.
- The Publish-CrmCustomization cmdlet lets you publish specified customizations.
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- conn
-
- System.Management.Automation.ParameterAttribute
- System.Management.Automation.ArgumentTypeConverterAttribute
-
-
- A connection to your CRM organization. Use $conn = Get-CrmConnection <Parameters> to generate it.
-
-
-
-
- Entity
-
- System.Management.Automation.ParameterAttribute
- System.Management.Automation.ArgumentTypeConverterAttribute
-
-
- Specify this when you publish Entity.
-
-
-
-
- EntityLogicalNames
-
- System.Management.Automation.ParameterAttribute
- System.Management.Automation.ArgumentTypeConverterAttribute
-
-
- Array of Entity Logical Name to publish. Use with -Entity switch.
-
-
-
-
- Ribbon
-
- System.Management.Automation.ParameterAttribute
- System.Management.Automation.ArgumentTypeConverterAttribute
-
-
- Specify this to publish Ribbon.
-
-
-
-
- SiteMap
-
- System.Management.Automation.ParameterAttribute
- System.Management.Automation.ArgumentTypeConverterAttribute
-
-
- Specify this to publish SiteMap.
-
-
-
-
- Dashbord
-
- System.Management.Automation.ParameterAttribute
- System.Management.Automation.ArgumentTypeConverterAttribute
-
-
- Specify this when you publish Dashboard.
-
-
-
-
- DashbordIds
-
- System.Management.Automation.ParameterAttribute
- System.Management.Automation.ArgumentTypeConverterAttribute
-
-
- Array of Dashboard Id to publish. Use with -Dashboard switch.
-
-
-
-
- OptionSet
-
- System.Management.Automation.ParameterAttribute
- System.Management.Automation.ArgumentTypeConverterAttribute
-
-
- Specify this when you publish OptionSet.
-
-
-
-
- OptionSetNames
-
- System.Management.Automation.ParameterAttribute
- System.Management.Automation.ArgumentTypeConverterAttribute
-
-
- Array of OptionSet Logical Name to publish. Use with -OptionSet switch.
-
-
-
-
- WebResource
-
- System.Management.Automation.ParameterAttribute
- System.Management.Automation.ArgumentTypeConverterAttribute
-
-
- Specify this when you publish WebResource.
-
-
-
-
- WebResourceIds
-
- System.Management.Automation.ParameterAttribute
- System.Management.Automation.ArgumentTypeConverterAttribute
-
-
- Array of WebResource Ids to publish. Use with -WebResource switch.
-
-
-
-
-
-
- Example 1
- Publish-CrmCustomization -conn $conn -Entity -EntityLogicalNames account,contact,systemuser
-
- This example publishes Account, Contact and System Entity Metadata.
-
-
-
-
- Example 2
- Publish-CrmCustomization -conn $conn -Ribbon -SiteMap
-
- This example publishes Ribbon and SiteMap
-
-
-
-
- Example 3
- Publish-CrmCustomization -conn $conn -Dashbord -DashbordIds 79dcdea7-490a-46ed-a887-9ed87fe39d66,90a32046-973e-4370-ad3f-06b9e73ed036
-
- This example publishes specified Dashboards.
-
-
-
-
-
- false
-
-
- Grant-CrmRecordAccess
-
- Grant-CrmRecordAccess [[-conn] <CrmServiceClient>] [-CrmRecord] <PSObject[]> [-Principal] <EntityReference> [-AccessMask] <AccessRights>
- Grant-CrmRecordAccess [[-conn] <CrmServiceClient>] [-EntityLogicalName] <String> [-Id] <Guid> [-Principal] <EntityReference> [-AccessMask] <AccessRights>
-
-
- Grant access privilege to a crm record.
- The Grant-CrmRecordAccess cmdlet lets you grant a security principal (user or team) access to the specified record. The operation will create access rights if none already exist, or be additive to any existing access rights already granted. That is, if a principal has pre-existing access rights to a record, any new access rights specified in executing this cmdlet are granted and no existing rights are removed. Note that the append right requires both AppendAccess and AppendToAccess to be specified.
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- conn
-
- System.Management.Automation.ParameterAttribute
- System.Management.Automation.ArgumentTypeConverterAttribute
-
-
- A connection to your CRM organization. Use $conn = Get-CrmConnection <Parameters> to generate it.
-
-
-
-
- CrmRecord
-
- System.Management.Automation.ParameterAttribute
- System.Management.Automation.ArgumentTypeConverterAttribute
-
-
- The record object to grant access to, obtained via Get-CrmRecord/Get-CrmRecords. When you pass CrmRecord, then you don't use EntityLogicalName/Id.
-
-
-
- Principal
-
- System.Management.Automation.ParameterAttribute
- System.Management.Automation.ArgumentTypeConverterAttribute
-
-
- The principal (user or team) being granted access rights to the record. Use New-CrmEntityReference <Parameters> to generate it.
-
-
-
- AccessMask
-
- System.Management.Automation.ParameterAttribute
- System.Management.Automation.ArgumentTypeConverterAttribute
-
-
- The access rights to grant the principal over the record. Assign multiple values to generate the full value, e.g. AppendAccess,ReadAccess,WriteAccess.
-
-
-
- EntityLogicalName
-
- System.Management.Automation.ParameterAttribute
- System.Management.Automation.ArgumentTypeConverterAttribute
-
-
- The logical name of an entity to grant access to, i.e. account, contact, lead, etc.
-
-
-
- Id
-
- System.Management.Automation.ParameterAttribute
- System.Management.Automation.ArgumentTypeConverterAttribute
-
-
- The Id of a record to grant access to.
-
-
-
-
-
- Example 1
- Grant-CrmRecordAccess -conn $conn -CrmRecord $contact -Principal $team -AccessMask AppendAccess,AppendToAccess,ReadAccess,WriteAccess
- This example grants a team append, read, and write access to a contact record.
-
-
-
- Example 2
- $contact | Grant-CrmRecordAccess -conn $conn -Principal $team -AccessMask ReadAccess,WriteAccess,DeleteAccess
- This example pipes a contact to Grant-CrmRecordAccess and grants a team read, write, and delete access to it.
-
-
-
-
-
- false
-
-
- Import-CrmSolutionAsync
-
- Import-CrmSolutionAsync [-conn <CrmServiceClient>] [-SolutionFilePath] <String> [[-ActivateWorkflows] <SwitchParameter>] [[-OverwriteUnManagedCustomizations] <SwitchParameter>] [[-SkipDependancyOnProductUpdateCheckOnInstall] <SwitchParameter>] [[-PublishChanges] <SwitchParameter>] [[-MaxWaitTimeInSeconds] <Int64>] [[-ImportAsHoldingSolution] <SwitchParameter>] [[-BlockUntilImportComplete] <SwitchParameter>] [[-PollingDelayInSeconds] <Int64>]
-
-
- Import a solution using an import job.
- Import a solution using an import job and poll for the result (success or failure). This is the preferred method of importing.
-
-
-
-
-
-
-
-
-
-
-
-
-
- conn
-
- System.Management.Automation.ParameterAttribute
- System.Management.Automation.ArgumentTypeConverterAttribute
-
-
- A connection to your CRM organization. Use $conn = Get-CrmConnection <Parameters> to generate it.
-
-
-
-
- SolutionFilePath
-
- System.Management.Automation.ParameterAttribute
- System.Management.Automation.ArgumentTypeConverterAttribute
-
-
- A file path to solution zip file.
-
-
-
- ActivateWorkflows
-
- System.Management.Automation.ParameterAttribute
- System.Management.Automation.ArgumentTypeConverterAttribute
-
-
- Specify the parameter to active plug-ins when importing solution.
-
-
-
- OverwriteUnManagedCustomizations
-
- System.Management.Automation.ParameterAttribute
- System.Management.Automation.ArgumentTypeConverterAttribute
-
-
- Specify the parameter to overwrite conflicting unmanaged customizations when importing solution.
-
-
-
-
- SkipDependancyOnProductUpdateCheckOnInstall
-
- System.Management.Automation.ParameterAttribute
- System.Management.Automation.ArgumentTypeConverterAttribute
-
-
- Specify the parameter to skip dependency check when importing solution.
-
-
-
-
- PublishChanges
-
- System.Management.Automation.ParameterAttribute
- System.Management.Automation.ArgumentTypeConverterAttribute
-
-
- Automatically publish the changes if the import completes before the max wait time
-
-
-
- MaxWaitTimeInSeconds
-
- System.Management.Automation.ParameterAttribute
- System.Management.Automation.ArgumentTypeConverterAttribute
-
-
- Specify the parameter to override the default maximum 900 seconds (15 minutes) to wait for an imported solution to complete.
-
-
-
-
- ImportAsHoldingSolution
-
- System.Management.Automation.ParameterAttribute
- System.Management.Automation.ArgumentTypeConverterAttribute
-
-
- Import as a holding solution
-
-
-
- BlockUntilImportComplete
-
- System.Management.Automation.ParameterAttribute
- System.Management.Automation.ArgumentTypeConverterAttribute
-
-
- Rather than return the import ID - block and poll until the command is complete
-
-
-
- PollingDelayInSeconds
-
- System.Management.Automation.ParameterAttribute
- System.Management.Automation.ArgumentTypeConverterAttribute
-
-
-
-
-
-
-
-
- Example 1
- Import-CrmSolutionAsync -SolutionFilePath c:\temp\mysolution.zip -ActivateWorkflows -OverwriteUnManagedCustomizations -MaxWaitTimeInSeconds 600
- Import a solution using an import job, poll for the result for up to 600 seconds
-
-
-
-
-
- false
-
-
- Publish-CrmTheme
-
- Publish-CrmTheme [-conn <CrmServiceClient>] [-ThemeName] <String>
- Publish-CrmTheme [-conn <CrmServiceClient>] [-ThemeId] <Guid>
-
-
- Publishes a Theme for a CRM Organization.
- The Publish-CrmTheme cmdlet lets you publish a Theme.
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- conn
-
- System.Management.Automation.ParameterAttribute
- System.Management.Automation.ArgumentTypeConverterAttribute
-
-
- A connection to your CRM organization. Use $conn = Get-CrmConnection <Parameters> to generate it.
-
-
-
-
- ThemeName
-
- System.Management.Automation.ParameterAttribute
- System.Management.Automation.ArgumentTypeConverterAttribute
-
-
- Name of the Theme you want to publish.
-
-
-
- ThemeId
-
- System.Management.Automation.ParameterAttribute
- System.Management.Automation.ArgumentTypeConverterAttribute
-
-
- Id for the Theme you want to publish.
-
-
-
-
-
- Example 1
- Publish-CrmTheme -conn $conn -ThemeName "CRM Default Theme"
- This example publishes "CRM Default Theme" theme.
-
-
-
- Example 2
- Publish-CrmTheme -conn $conn -ThemeId f499443d-2082-4938-8842-e7ee62de9a23
- This example publishes theme with id "This example publishes "CRM Default Theme" theme."
-
-
-
-
-
- false
-
-
- Revoke-CrmRecordAccess
-
- Revoke-CrmRecordAccess [[-conn] <CrmServiceClient>] [-CrmRecord] <PSObject[]> [-Revokee] <EntityReference>
- Revoke-CrmRecordAccess [[-conn] <CrmServiceClient>] [-EntityLogicalName] <String> [-Id] <Guid> [-Revokee] <EntityReference>
-
-
- Revokes (removes) access rights on the target record for the specified security principal (user or team).
- The Revoke-CrmRecordAccess cmdlet lets you remove a security principal's (user or team) previously granted access to a specified record.
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- conn
-
- System.Management.Automation.ParameterAttribute
- System.Management.Automation.ArgumentTypeConverterAttribute
-
-
- A connection to your CRM organization. Use $conn = Get-CrmConnection <Parameters> to generate it.
-
-
-
-
- CrmRecord
-
- System.Management.Automation.ParameterAttribute
- System.Management.Automation.ArgumentTypeConverterAttribute
-
-
- The record object to revoke access to, obtained via Get-CrmRecord/Get-CrmRecords. When you pass CrmRecord, then you don't use EntityLogicalName/Id.
-
-
-
- Revokee
-
- System.Management.Automation.ParameterAttribute
- System.Management.Automation.ArgumentTypeConverterAttribute
-
-
- The principal (user or team) whose access rights are to be revoked from the record. Use New-CrmEntityReference <Parameters> to generate it.
-
-
-
- EntityLogicalName
-
- System.Management.Automation.ParameterAttribute
- System.Management.Automation.ArgumentTypeConverterAttribute
-
-
- # The logical name of an entity to revoke access to, i.e. account, contact, lead, etc.
-
-
-
- Id
-
- System.Management.Automation.ParameterAttribute
- System.Management.Automation.ArgumentTypeConverterAttribute
-
-
- # The Id of a record to revoke access to.
-
-
-
-
-
- Example 1
- Revoke-CrmRecordAccess -conn $conn -CrmRecord $contact -Principal $team
-
- This example revokes a team's access rights to a contact record.
-
-
-
- Example 2
- $contact | Revoke-CrmRecordAccess -conn $conn -Principal $team
- This example pipes a contact to Revoke-CrmRecordAccess and removes a team's access rights to the contact.
-
-
-
-
-
- false
-
-
- Set-CrmRecordAccess
-
- Set-CrmRecordAccess [[-conn] <CrmServiceClient>] [-CrmRecord] <PSObject[]> [-Principal] <EntityReference> [-AccessMask] <AccessRights>
- Set-CrmRecordAccess [[-conn] <CrmServiceClient>] [-EntityLogicalName] <String> [-Id] <Guid> [-Principal] <EntityReference> [-AccessMask] <AccessRights>
-
-
- Sets a security principal's (user or team) access to the specified record.
- The Set-CrmRecordAccess cmdlet sets a security principal's (user or team) access to the specified record. The operation creates access rights if none exist, or replaces existing access rights. That is, if a principal has been granted pre-existing access rights to a record, any access rights specified in executing this cmdlet are granted and any existing access rights not specified are removed. Note that the append right requires both AppendAccess and AppendToAccess to be specified.
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- conn
-
- System.Management.Automation.ParameterAttribute
- System.Management.Automation.ArgumentTypeConverterAttribute
-
-
- A connection to your CRM organization. Use $conn = Get-CrmConnection <Parameters> to generate it.
-
-
-
- CrmRecord
-
- System.Management.Automation.ParameterAttribute
- System.Management.Automation.ArgumentTypeConverterAttribute
-
-
- The record object to grant access to, obtained via Get-CrmRecord/Get-CrmRecords. When you pass CrmRecord, then you don't use EntityLogicalName/Id.
-
-
-
- Principal
-
- System.Management.Automation.ParameterAttribute
- System.Management.Automation.ArgumentTypeConverterAttribute
-
-
- The principal (user or team) being granted access rights to the record. Use New-CrmEntityReference <Parameters> to generate it.
-
-
-
- AccessMask
-
- System.Management.Automation.ParameterAttribute
- System.Management.Automation.ArgumentTypeConverterAttribute
-
-
- The access rights to grant the principal over the record. Assign multiple values to generate the full value, e.g. AppendAccess,ReadAccess,WriteAccess.
-
-
-
- EntityLogicalName
-
- System.Management.Automation.ParameterAttribute
- System.Management.Automation.ArgumentTypeConverterAttribute
-
-
- The logical name of an entity to grant access to, i.e. account, contact, lead, etc.
-
-
-
- Id
-
- System.Management.Automation.ParameterAttribute
- System.Management.Automation.ArgumentTypeConverterAttribute
-
-
- The Id of a record to grant access to.
-
-
-
-
-
- Example 1
- Set-CrmRecordAccess -conn $conn -CrmRecord $contact -Principal $team -AccessMask AppendAccess,AppendToAccess,ReadAccess,WriteAccess
-
- This example grants a team append, read, and write access to a contact record. Any other access rights previously assigned would be revoked.
-
-
-
- Example 2
- $contact | Set-CrmRecordAccess -conn $conn -Principal $team -AccessMask ReadAccess,WriteAccess,DeleteAccess
- This example pipes a contact to Set-CrmRecordAccess and grants a team read, write, and delete access to it.
-
-
-
-
-
- false
-
-
- Set-CrmSolutionVersionNumber
-
- Set-CrmSolutionVersionNumber [-conn <CrmServiceClient>] [-SolutionName] <String> [-VersionNumber] <String>
-
-
- Sets a CDS Solutions version number.
- Sets a CDS Solutions version number in the CDS Database via an api call
-
-
-
-
-
-
-
-
-
-
-
-
-
- conn
-
- System.Management.Automation.ParameterAttribute
- System.Management.Automation.ArgumentTypeConverterAttribute
-
-
- A connection to your CRM organization. Use $conn = Get-CrmConnection <Parameters> to generate it.
-
-
-
- SolutionName
-
- System.Management.Automation.ParameterAttribute
- System.Management.Automation.ArgumentTypeConverterAttribute
-
-
- Name of solution
-
-
-
- VersionNumber
-
- System.Management.Automation.ValidatePatternAttribute
- System.Management.Automation.ParameterAttribute
- System.Management.Automation.ArgumentTypeConverterAttribute
-
-
- Version Number
-
-
-
-
-
-
- false
-
-
- Revoke-CrmEmailAddress
-
- Revoke-CrmEmailAddress [-conn <CrmServiceClient>] [-UserId] <String>
- Revoke-CrmEmailAddress [-conn <CrmServiceClient>] [-QueueId] <String>
-
-
- Revoke email address change of a user or a queue.
- The Revoke-CrmEmailAddress cmdlet lets you revoke email address change of a user or a queue.
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- conn
-
- System.Management.Automation.ParameterAttribute
- System.Management.Automation.ArgumentTypeConverterAttribute
-
-
- A connection to your CRM organization. Use $conn = Get-CrmConnection <Parameters> to generate it.
-
-
-
-
- UserId
-
- System.Management.Automation.ParameterAttribute
- System.Management.Automation.ArgumentTypeConverterAttribute
-
-
- A record Id of User.
-
-
-
-
- QueueId
-
- System.Management.Automation.ParameterAttribute
- System.Management.Automation.ArgumentTypeConverterAttribute
-
-
- A record Id of Queue.
-
-
-
-
-
-
- Example 1
- Revoke-CrmEmailAddress -conn $conn -UserId 00005a70-6317-e511-80da-c4346bc43d94
-
- This example revokes email address for a user.
-
-
-
-
- Example 2
- Revoke-CrmEmailAddress -UserId 00005a70-6317-e511-80da-c4346bc43d94
-
- This example revokes email address for a user by omitting parameters names.
-When omitting parameter names, you do not provide $conn, cmdlets automatically finds it.
-
-
-
- Example 3
- Revoke-CrmEmailAddress -conn $conn -QueueId 00005a70-6317-e511-80da-c4346bc43d94
-
-
-
-
-
-
-
- false
-
-
- Invoke-CrmAction
-
- Invoke-CrmAction [-conn <CrmServiceClient>] [-Name] <String> [[-Parameters] <Hashtable>] [[-Target] <EntityReference>] [-Raw]
-
-
- Invoke a CDS or CRM Action
- Invoke a CDS or CRM Action
-
-
-
-
- System.Collections.Hashtable;Microsoft.Xrm.Sdk.OrganizationResponse
-
-
-
-
-
-
-
-
- conn
-
- System.Management.Automation.ParameterAttribute
- System.Management.Automation.ArgumentTypeConverterAttribute
-
-
-
-
-
-
- Name
-
- System.Management.Automation.ValidateNotNullOrEmptyAttribute
- System.Management.Automation.ParameterAttribute
- System.Management.Automation.ArgumentTypeConverterAttribute
-
-
-
-
-
-
- Parameters
-
- System.Management.Automation.ParameterAttribute
- System.Management.Automation.ArgumentTypeConverterAttribute
-
-
-
-
-
-
- Target
-
- System.Management.Automation.ValidateNotNullOrEmptyAttribute
- System.Management.Automation.ParameterAttribute
- System.Management.Automation.ArgumentTypeConverterAttribute
-
-
-
-
-
-
- Raw
-
- System.Management.Automation.ParameterAttribute
- System.Management.Automation.ArgumentTypeConverterAttribute
-
-
-
-
-
-
-
-
- -------------------------- Example 1 --------------------------
- Invoke-CrmAction -conn $conn -Name "new_NoOutputs"
- This example shows the execution of a custom unbound action named "new_NoOutputs" that doesn't accept any input arguments and doesn't return any output arguments. There is no output because the action doesn't have any output arguments.
-
-
-
- -------------------------- Example 2 --------------------------
- Invoke-CrmAction -conn $conn -Name 'new_NoInputs'
- This example shows the execution of a custom unbound action named 'new_NoInputs' that doesn't accept any input arguments and returns the output arguments in a [hashtable]. The output consists of a single Boolean argument named 'Output'.
-
-
-
- -------------------------- Example 3 --------------------------
- Invoke-CrmAction -conn $conn -Name 'new_Echo' -Parameters @{BooleanInput=$true;DateTimeInput=[DateTime]::Now}
- This example shows the execution of a custom unbound action named 'new_Echo' that accepts two input arguments and returns them as output argments in a hastable, along with returning one output argument for each type of each possible output argument type supported by actions.
-
-
-
- -------------------------- Example 4 --------------------------
- Invoke-CrmAction -conn $conn -Name 'new_ContactBound' -Target $contactRef -Parameters @{Activate = $true }
- This example shows the execution of an unbound action named 'new_ContactBound' that is bound to the contact entity, with the contact record to process being the $contactRef [Microsoft.Xrm.Sdk.EntityReference] object (see New-CrmEntityReference). There are no output arguments and as no return value.
-
-
-
- -------------------------- Example 5 --------------------------
- $contactRef1,$contactRef2 | Invoke-CrmAction -conn $conn -Name 'new_ContactBound' -Parameters @{Activate = $true } -Raw
- This example shows the execution of an unbound action named 'new_ContactBound' that is bound to the contact entity, with the contact records to process being piped to Invoke-CrmAction, and the use of the -Raw switch. The action doesn't have any output arguments and as such would normally not have any output, but because the -Raw switch is used the output includes the two original unparsed [Microsoft.Xrm.Sdk.OrganizationResponse] objects, one for each invocation of the action.
-
-
-
-
-
- false
-
-
- Set-CrmQueueMailbox
-
- Set-CrmQueueMailbox [-conn <CrmServiceClient>] [-QueueId] <String> [-EmailAddress <String>] [-EmailServerProfile <Guid>] [-IncomingEmailDeliveryMethod <Int32>] [-OutgoingEmailDeliveryMethod <Int32>]
- Set-CrmQueueMailbox [-conn <CrmServiceClient>] [-QueueId] <String> [-EmailAddress <String>] [-ApplyDefaultEmailSettings]
- Set-CrmQueueMailbox [-conn <CrmServiceClient>] [-QueueId] <String> [-EmailAddress <String>] [-StateCode <String>] [-StatusCode <String>] [-ScheduleTest] [-MarkedAsPrimaryForExchangeSync] [-ApproveEmail]
-
-
- Sets the CRM mailbox for a given queue
- Sets the CRM mailbox for a given queue.
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- conn
-
- System.Management.Automation.ParameterAttribute
- System.Management.Automation.ArgumentTypeConverterAttribute
-
-
- A connection to your CRM organization. Use $conn = Get-CrmConnection <Parameters> to generate it.
-
-
-
-
- QueueId
-
- System.Management.Automation.ParameterAttribute
- System.Management.Automation.ArgumentTypeConverterAttribute
-
-
- An Id of queue.
-
-
-
-
- EmailAddress
-
- System.Management.Automation.ValidatePatternAttribute
- System.Management.Automation.ParameterAttribute
- System.Management.Automation.ArgumentTypeConverterAttribute
-
-
- An EmailAddress of the queue.
-
-
-
-
- EmailServerProfile
-
- System.Management.Automation.ParameterAttribute
- System.Management.Automation.ArgumentTypeConverterAttribute
-
-
- Change "Server Profile" setting of Synchronization Method. This parameter accepts Email Server Profile record's guid. To get all profiles, use Get-CrmEmailServerProfiles command and use ProfileId.
-
-
-
-
- IncomingEmailDeliveryMethod
-
- System.Management.Automation.ParameterAttribute
- System.Management.Automation.ArgumentTypeConverterAttribute
-
-
- Change "Incoming Email" setting for Configure default synchronization method. This parameter accepts int. To get all options, use Get-CrmEntityOptionSet mailbox incomingemaildeliverymethod | % Items command and use PickListItemId.
-
-
-
- OutgoingEmailDeliveryMethod
-
- System.Management.Automation.ParameterAttribute
- System.Management.Automation.ArgumentTypeConverterAttribute
-
-
- Change "Outgoing Email" setting for Configure default synchronization method. This parameter accepts int. To get all options, use Get-CrmEntityOptionSet mailbox outgoingemaildeliverymethod | % Items command and use PickListItemId.
-
-
-
- ApplyDefaultEmailSettings
-
- System.Management.Automation.ParameterAttribute
- System.Management.Automation.ArgumentTypeConverterAttribute
-
-
- Specify this to apply the organization default settings
-
-
-
- StateCode
-
- System.Management.Automation.ParameterAttribute
- System.Management.Automation.ArgumentTypeConverterAttribute
-
-
- StateCode value for a record. You can retrieve values by using Get-CrmEntityOptionSet <EntityLogicalName> statecode | % {$_.Items}
-
-
-
-
- StatusCode
-
- System.Management.Automation.ParameterAttribute
- System.Management.Automation.ArgumentTypeConverterAttribute
-
-
- StatusCode value for a record. You can retrieve values by using Get-CrmEntityOptionSet <EntityLogicalName> statuscode | % {$_.Items}
-
-
-
- ScheduleTest
-
- System.Management.Automation.ParameterAttribute
- System.Management.Automation.ArgumentTypeConverterAttribute
-
-
- Specify this to schedule test for the mailbox
-
-
-
- MarkedAsPrimaryForExchangeSync
-
- System.Management.Automation.ParameterAttribute
- System.Management.Automation.ArgumentTypeConverterAttribute
-
-
- Specify this to mark the mailbox as primary mailbox to sync with Exchange Online
-
-
-
- ApproveEmail
-
- System.Management.Automation.ParameterAttribute
- System.Management.Automation.ArgumentTypeConverterAttribute
-
-
- Specify this to approve the emailaddress.
-
-
-
-
-
- Example 1
- Set-CrmQueueMailbox -conn $conn -QueueId f9d40920-7a43-4f51-9749-0549c4caf67d -IncomingEmailDeliveryMethod 0
- This example updates "Incoming Email" setting to "None".
-
-
-
- Example 2
- Set-CrmQueueMailbox -conn $conn -QueueId f9d40920-7a43-4f51-9749-0549c4caf67d -EmailServerProfile 1b2d4b03-831e-e511-80e1-c4346bc44d24
- This example updates "Server Profile" setting to specified Profile.
-
-
-
- Example 3
- Set-CrmQueueMailbox -conn $conn -QueueId f9d40920-7a43-4f51-9749-0549c4caf67d -ApplyDefaultEmailSettings
- This example updates mailbox email settings to default settings, which is in System Settings.
-
-
-
- Example 4
- Set-CrmQueueMailbox -QueueId f9d40920-7a43-4f51-9749-0549c4caf67d -IncomingEmailDeliveryMethod 0
- This example disables "Incoming Email" setting to "None" by omitting -conn parameter.
-When omitting conn parameter, cmdlets automatically finds it.
-
-
-
- Example 5
- Set-CrmQueueMailbox -QueueId f9d40920-7a43-4f51-9749-0549c4caf67d -ApplyDefaultEmailSettings
- This example updates mailbox email settings to default settings, which is in System Settings by omitting -conn parameter. When omitting conn parameter, cmdlets automatically finds it.
-
-
-
- Example 6
- Set-CrmQueueMailbox -conn $conn -QueueId f9d40920-7a43-4f51-9749-0549c4caf67d -StateCode Active -StatusCode Active -ScheduleTest -MarkedAsPrimaryForExchangeSync -ApproveEmail
- This example activates mailbox, approve emailaddress, schedule test and set the mailbox as primary for sync with Exchange Online.
-
-
-
-
-
- false
-
-
- Merge-CrmHoldingSolutionAsync
-
- Merge-CrmHoldingSolutionAsync -conn <CrmServiceClient> [-CrmSolutionName] <String> [[-MaxWaitTimeInSeconds] <Int64>] [[-BlockUntilImportComplete] <SwitchParameter>] [[-PollingDelayInSeconds] <Int64>]
-
-
- Merges a holding solution.
- Merges a holding solution using the DeleteAndPromoteRequest
-
-
-
-
-
-
-
-
-
-
-
-
-
- conn
-
- System.Management.Automation.ParameterAttribute
- System.Management.Automation.ArgumentTypeConverterAttribute
-
-
- The connection to the CRM organization. Use Get-CrmConnection or one of the other connection functions to get it.
-
-
-
- CrmSolutionName
-
- System.Management.Automation.ParameterAttribute
- System.Management.Automation.ArgumentTypeConverterAttribute
-
-
- The unique name of the base solution to apply the upgrade.
-
-
-
- PollingDelayInSeconds
-
- System.Management.Automation.ParameterAttribute
- System.Management.Automation.ArgumentTypeConverterAttribute
-
-
- The polling delay in seconds, to check wether the delete and promote async operation has finished. If specified, it will override the default value of 5 seconds.
-
-
-
- MaxWaitTimeInSeconds
-
- System.Management.Automation.ParameterAttribute
- System.Management.Automation.ArgumentTypeConverterAttribute
-
-
- The polling delay in seconds, to check wether the delete and promote async operation has finished. If specified, it will override the default value of 5 seconds. After the max time expires, the command will still execute in the background but the powershell code will continue
-
-
-
- BlockUntilImportComplete
-
- System.Management.Automation.ParameterAttribute
- System.Management.Automation.ArgumentTypeConverterAttribute
-
-
- If specified, the execution will poll and wait for the delete and promote async operation to complete. If not specified, it will return the asyncoperationid immediatelly and the operation will continue to execute asynchronously on Dynamics organization.
-
-
-
-
-
- Example1
- Merge-CrmHoldingSolutionAsync -conn $conn -CrmSolutionName "SampleSolution"
- This example requests a delete and promote message regarding a Dynamics solution named "SampleSolution" and returns the system job id.
-
-
-
- Example2
- Merge-CrmHoldingSolutionAsync -conn $conn -CrmSolutionName "SampleSolution" -MaxWaitTimeInSeconds 900 -PollingDelayInSeconds 60 -BlockUntilImportComplete
- This example requests a delete and promote message regarding a Dynamics solution named "SampleSolution", while specifying that the execution should wait for the system job to finish and should poll the job every 60 seconds. It also sets a maximum blocking/polling time of 15 minutes (900 seconds). After the max time expires, the command will still execute in the background but the powershell code will continue
-
-
-
-
-
- false
-
-
- Disable-CrmConnectorVerboseLogging
-
- Disable-CrmConnectorVerboseLogging
-
-
- Disable verbsoe logging for the CDS connector.
- Disable verbsoe logging for the CDS connector.
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- false
-
-
- Enable-CrmConnectorVerboseLogging
-
- Enable-CrmConnectorVerboseLogging [[-filePath] <String>]
-
-
- Enable verbsoe logging for the CDS connector.
- Enable verbsoe logging for the CDS connector.
-
-
-
-
-
-
-
-
-
-
-
-
-
- filePath
-
- System.Management.Automation.ParameterAttribute
- System.Management.Automation.ArgumentTypeConverterAttribute
-
-
- Valid path to the file you wish to have log entries pushed into
-
-
-
-
-
-
- false
-
-
-
\ No newline at end of file
diff --git a/Microsoft.Xrm.Data.PowerShell/Microsoft.Xrm.Data.PowerShell.psm1 b/Microsoft.Xrm.Data.PowerShell/Microsoft.Xrm.Data.PowerShell.psm1
index 3ab2b6f..5b28bd3 100644
--- a/Microsoft.Xrm.Data.PowerShell/Microsoft.Xrm.Data.PowerShell.psm1
+++ b/Microsoft.Xrm.Data.PowerShell/Microsoft.Xrm.Data.PowerShell.psm1
@@ -26,6 +26,7 @@ function Connect-CrmOnlineDiscovery{
}
if($InteractiveMode)
{
+ Write-Verbose "Running interactive command: Get-CrmConnection -InteractiveMode -Verbose"
$global:conn = Get-CrmConnection -InteractiveMode -Verbose
Write-Verbose "You are now connected and may run any of the CRM Commands."
@@ -38,6 +39,7 @@ function Connect-CrmOnlineDiscovery{
else
{
$onlineType = "OAuth"
+ Write-Verbose "Running command: Get-CrmOrganizations -Credential -OnLineType $onlineType -Verbose"
$crmOrganizations = Get-CrmOrganizations -Credential $Credential -OnLineType $onlineType -Verbose
@@ -71,6 +73,9 @@ function Connect-CrmOnlineDiscovery{
return $global:conn
}
+ else{
+ Write-Error "Could not find any Organizations. Please verify your credentials and try again."
+ }
}
}
@@ -127,7 +132,7 @@ function Connect-CrmOnline{
$ServerUrl = "https://" + $ServerUrl
}
- #starting default connection string with require new instance and server url
+ #starting default connection string with require new instance server url then handle bypassTokenCache, forceDiscovery, and connectionTimeout
$cs = "RequireNewInstance=True"
$cs += ";Url=$ServerUrl"
if($BypassTokenCache){
@@ -137,6 +142,7 @@ function Connect-CrmOnline{
if($ForceDiscovery){
#SkipDiscovery is true by default and generally not necessary
Write-Verbose "ForceDiscovery: SkipDiscovery=False"
+ Write-Warning "ForceDiscovery should not be needed, if you require this parameter please log an issue to document the use-case."
$cs+=";SkipDiscovery=False"
if(-not $Credential){
Write-Verbose "ForceDiscovery requires a Credential which was not provided - prompting for credential value"
@@ -193,74 +199,97 @@ function Connect-CrmOnline{
}
}
else{
+ #default logic try oAuth first, then if there's a failure fall back to try basic
+
+ $fallbackCs = $cs.ToString(); #use for falling back to basic auth
+
if(-not [string]::IsNullOrEmpty($Username) -and $ForceOAuth -eq $false){
$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"
- 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"
+
+ 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)'"
- }
- 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){
- #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"
+ }else{
+ Write-Verbose "No credential provided, attempting single sign on with no credentials in the connectionstring"
+ }
+
+ #use the clientid if provided, else use a provided clientid
+ if($OAuthClientId){
+ Write-Verbose "Using provided oAuth clientid"
+ $cs += ";AuthType=OAuth;ClientId=$OAuthClientId"
+ if($OAuthRedirectUri){
+ $cs += ";redirecturi=$OAuthRedirectUri"
}
}
-
+ else{
+ #use a default app if one isn't provided
+ $cs+=";AuthType=OAuth;ClientId=2ad88395-b77d-4561-9441-d0e40824f9bc"
+ $cs+=";redirecturi=app://5d3e90d6-aa8e-48a8-8f2c-58b45cc67315"
+ }
try
{
if(!$cs -or $cs.Length -eq 0){
throw "Cannot create the CrmServiceClient, the connection string is null"
}
#log the connection string to be helpful
- $loggedConnectionString = $cs
if($Credential){
$loggedConnectionString = $cs.Replace($Credential.GetNetworkCredential().Password, "*******")
+ }else{
+ $loggedConnectionString = $cs
}
+
Write-Verbose "ConnectionString:{$loggedConnectionString}"
+ #try to connect
$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"
+ Write-Error -Message "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"
+ }
+ elseif($global:conn.LastCrmError -and $global:conn.LastCrmError -match "User canceled authentication"){
+ Write-Error -Message "User canceled authentication, please retry your connection."
+ }
+ elseif($global:conn.LastCrmError -and $global:conn.LastCrmError -match "The remote name could not be resolved"){
+ Write-Error -Message "The remote name could not be resolved for the instance provided - please double check the url and retry."
+ }
+ elseif(-not [string]::IsNullOrEmpty($global:conn.LastCrmError)){
+ Write-Error "Error encountered: $($global:conn.LastCrmError)"
+ #On any connection failure, fall back to Office365 Auth just in case
+ if(!$OAuthClientId -and !$ForceOAuth -and [string]::IsNullOrEmpty($Username)){
+ Write-Warning "Connection failed, falling back to Basic Auth: AuthType=Office365"
+ if(-not $Credential){
+ #user did not provide a credential
+ Write-Warning "No credentials were provided for Basic Auth. 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."
+ }
+ }
+ $fallbackCs+= ";AuthType=Office365"
+ $fallbackCs+= ";Username=$($Credential.UserName)"
+ $fallbackCs+= ";Password='$($Credential.GetNetworkCredential().Password)'"
+ if($Credential){
+ $loggedConnectionString = $fallbackCs.Replace($Credential.GetNetworkCredential().Password, "*******")
+ }else{
+ $loggedConnectionString = $fallbackCs
+ }
+ Write-Verbose "Fallback ConnectionString:{$loggedConnectionString}"
+ $global:conn = New-Object Microsoft.Xrm.Tooling.Connector.CrmServiceClient -ArgumentList $fallbackCs
+ $global:conn.SessionTrackingId = "1ff216e3-afdc-4f3b-af65-f80f39060fff"
+
+ ApplyCrmServiceClientObjectTemplate($global:conn) #applyObjectTemplateFormat
+ return $global:conn
+ }
}
- return $global:conn
+ #return conn
+ $global:conn
}
catch
{
@@ -2169,7 +2198,7 @@ function Import-CrmSolution{
try{
$import = Get-CrmRecord -conn $conn -EntityLogicalName importjob -Id $importId -Fields solutionname,data,completedon,startedon,progress
} catch {
- if($transientFailureCount > 5){
+ if($transientFailureCount -gt 5){
Write-Error "Import Job status check FAILED 5 times this could be due to a bug where the service returns a 401. Throwing lastException:";
throw $conn.LastCrmException
}